Populate gridview with radio button

Posted by Ali under ASP.NET on 6/29/2010 | Views : 2505 | Status : [Member] | Replies : 1

I want to populate gridview from database, i have saved data from gridview to database. when i select radion button it save true in database.

now i want when i load data back into gridview , which radio button has value true in database it should be selected when gridview populated from database.



Posted by: Hbacharya on: 7/25/2010 [Member] Starter


There are many ways to achieve this.

Here I am mentioning simple one with sample in attachment.

1. Keep a hidden field in your aspx.
2. select the actual id which contains True value from database and save that in hidden field (I did that in page_load)
3. Write java script function which reads the value from hidden field ans select the perticular radiobutton.

Please check attached sample for your reference.


 Download source file

Ali, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response