RadioButton in GridView
-
Hello Friends, I want to have radiobutton in GridView. But only one RadioButton must be selected and also as i select a radiobutton then that row's id should be displayed
Use Gridview
Template Field
.cheers, Abhijit CodeProject MVP
-
Hello Friends, I want to have radiobutton in GridView. But only one RadioButton must be selected and also as i select a radiobutton then that row's id should be displayed
HI, Use Templatecolumns for placing radio buttons in gridview and after that by using javascript or server side code you can hide/visble the rows ...
-
Hello Friends, I want to have radiobutton in GridView. But only one RadioButton must be selected and also as i select a radiobutton then that row's id should be displayed
use the following code into tag of your gridview sel() is a js function you can use code of selecting current row function sel(srcElement) { alert('Ok'); var cb = event.srcElement; var curElement = cb; while (curElement && !(curElement.tagName == "TR")) { curElement = curElement.parentElement; } if (!(curElement == cb) && (cb.name != "cbxSelectAll")) { if (cb.checked) { curElement.style.backgroundColor = "gold"; rowsSelected = rowsSelected + 1; } else { curElement.style.backgroundColor = "white"; rowsSelected = rowsSelected - 1; } } }