I'm quite new to ASP.NET development so i don't know what's the best way to do this...
I want to list some data in several rows and have a column with a checkbox or radiobutton that allows the user to select a row; Then I should get a value like an ID from that selected row and after a button click send that info to another page (or same page) but changing the displayed data based on the choice made before. Is that possible w/ datagridview or datalist? I mean without postbacks...
I have an XML string and I bind it to DataGridView and it shows correctly the data in a table; I would like to have a column with some kind of control such as a radio button or whatever so that the user could select a row. Then I would pick, probably using JavaSrcipt, some value associated to that row and assync send it to the server-side, then I would present the user with a new interface based on the row selected before...
I hope i was clear; English is not my first language.. ;)
:D :D ;)
Yes , it is crystal clear now.
1) Put a boundField into it.
2) Convert it into Template
3) Goto template editing mode and remove everything given inside the ItemTemplate,and put a radio button or Check box there.
4) To get the current selected row and values in that row,you must have fired the selected index changed event any how as per my knowledge.
----- Use Ajax update panel instead. -----
5) so again bound your grid view with select button or something,and apply some css to hide it,so that the normal select button is not visible.
6) Now in the row_databound event of your gridview write some code like this
7) the above given code will provide you to have a clickable row interface without having your select button to be clicked. When you click any row on first cell,it will fire your grid's selected index changed even and this is what we want so that we can get the selected row.
--I have considered that you have that clickable radio button or checkbox in your first column. Else change that Cells value.
8) Now in the selected index changed event,write whatever you wanted to achieve.