ASP.NET c# - RadioButtons not grouped -


i have gridview , in onrowdatabound callback adding new cell , cell i'm adding radiobutton. i've set groupname on radio button, can still select more 1 button @ time.

how can make them grouped 1 radio button can selected within group.

edit - code:

    // add radio button select if purchased address     // set the home address of contact     e.row.cells.addat(0, new tablecell());     radiobutton rbsetaddress = new radiobutton();     rbsetaddress.id = "rdsetaddress" + e.row.cells[2].text;     rbsetaddress.groupname = "setaddress";     e.row.cells[0].controls.add(rbsetaddress); 

so i'm setting unique id , same groupname. asp.net not setting name attribute of input groupname. can select many radio buttons want. not want happen. want able select 1 , 1 in group identified groupname.

http://www.codeproject.com/kb/webforms/how_group_rbuttons.aspx

http://www.developer.com/net/asp/article.php/3623096/aspnet-tip-using-radiobutton-controls-in-a-repeater.htm

basically, when in repeater of kind (which gridview is), names no longer same group property result of way asp.net names things inside repeater (essentially each control gets prefix make unique).


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -