Add radio button control to Grid View and make only one selected radio button using JavaScript in Asp.net, C#
In this blog, I am going to show how to add radio button to the gridview and only one radio button selection at a time using JavaScript. First of all, add the below javascript code inside your <head> tag which is responsible for only single readio button selected :: <style type="text/css"> .Gridview { font-family:Verdana; font-size:10pt; font-weight:normal; color:black; width:300px; border-color:black; } </style> <script language="javascript" type="text/javascript"> function SelectSingleRadiobutton(rdbtnid) { var rdBtn = document.getElementById(rdbtnid); var rdBtnList = document.getElementsByTagName("input"); for (i = 0; i < rdBtnList.length; i++) { if (rdBtnList[i].type == "radio" && rdBtnList[i].id != rdBtn.id) { rdBtnList[i].checked = false; } } } </script> Now, add following c