Refer below sample code for your reference and implement it as per your requirement.
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
function RadioCheck(rb) {
var gv = document.getElementById("<%=GridView1.ClientID%>");
var inputs = gv.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "radio") {
var row = inputs[i].parentNode.parentNode;
var txtItemQuantity = GetChildControl(row, "txtItemQuantity");
var txtThirdCell = GetChildControl(row, "txtThirdCell");
if (inputs[i].checked && inputs[i].id != rb.id) {
inputs[i].checked = false;
txtItemQuantity.disabled = true;
txtThirdCell.disabled = true;
}
else if (inputs[i].checked && inputs[i].id == rb.id) {
txtItemQuantity.disabled = false;
txtThirdCell.disabled = false;
}
else {
txtItemQuantity.disabled = true;
txtThirdCell.disabled = true;
}
}
}
}
function GetChildControl(element, id) {
var child_elements = element.getElementsByTagName("*");
for (var i = 0; i < child_elements.length; i++) {
if (child_elements[i].id.indexOf(id) != -1) {
return child_elements[i];
}
}
};
function GetSelectedRowDetails() {
var gv = document.getElementById("<%=GridView1.ClientID%>");
var inputs = gv.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "radio") {
var row = inputs[i].parentNode.parentNode;
var txtItemQuantity = GetChildControl(row, "txtItemQuantity");
var txtThirdCell = GetChildControl(row, "txtThirdCell");
if (inputs[i].checked) {
alert("Quantity : " + txtItemQuantity.value + " ThirdCell value : " + txtThirdCell.value);
break;
}
}
}
return false;
}
$(function () {
$("[id*=btnGetRowDetails]").click(function () {
$('[id*=GridView1] tr').each(function () {
if ($(this).find("[id*=RadioButton1]").is(":checked")) {
alert("Quantity : " + $(this).find("[id*=txtItemQuantity]")[0].value + " ThirdCell value : " + $(this).find("[id*=txtThirdCell]")[0].value);
return false;
}
});
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" HeaderStyle-BackColor="green" AutoGenerateColumns="false"
Font-Names="Arial" Font-Size="11pt" AlternatingRowStyle-BackColor="#C2D69B" AllowPaging="true">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:RadioButton ID="RadioButton1" runat="server" onclick="RadioCheck(this);" />
<asp:Label ID="lblValue" runat="server" Text='<%#Eval("Option") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Item Qty">
<ItemTemplate>
<asp:TextBox ID="txtItemQuantity" runat="server" Enabled="false"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Third Cell">
<ItemTemplate>
<asp:TextBox ID="txtThirdCell" runat="server" Enabled="false"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
<br />
<asp:Button ID="btnGetDetails" runat="server" Text="Get details using Javascript"
OnClientClick="return GetSelectedRowDetails()" />
<asp:Button ID="btnGetRowDetails" runat="server" Text="Get details using JQuery" />
</div>
</form>
</body>
</html>
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[1] { new DataColumn("Option", typeof(string)) });
dt.Rows.Add("IC001");
dt.Rows.Add("IC002");
dt.Rows.Add("IC003");
dt.Rows.Add("IC004");
dt.Rows.Add("IC005");
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
Screenshot