Here I have created sample that will help you out.
HTML
<div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
function RadioCheck(rb) {
var gv = document.getElementById("<%=GridView1.ClientID%>");
var rbs = $(gv).find('[id*=RadioButton1]');
var row = rb.parentNode.parentNode;
var types = $(gv).find("[id*=HiddenField1]");
var type = $(row).find("[id*=HiddenField1]");
for (var i = 0; i < rbs.length; i++) {
if (type[0].value == types[i].value) {
if (rbs[i].type == "radio") {
if (rbs[i].checked && rbs[i] != rb && types[i] != type) {
rbs[i].checked = false;
break;
}
}
}
}
}
</script>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" BorderColor="Black"
DataKeyNames="ID,Type" BorderStyle="Solid" BorderWidth="1px" CellPadding="4"
CssClass="Gridview">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" />
<asp:TemplateField HeaderText="NAME" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left"
ItemStyle-CssClass="allcaps">
<ItemTemplate>
<asp:TextBox runat="server" ID="txt_Name" Text='<%#Eval("Name") %>' Font-Bold="false"
Font-Names="Verdana" Font-Size="12px" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Wrap="false" />
<ItemStyle Font-Names="Verdana" HorizontalAlign="Left" Wrap="false" />
</asp:TemplateField>
<asp:TemplateField HeaderText="COUNTRY" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left"
ItemStyle-CssClass="allcaps">
<ItemTemplate>
<asp:TextBox runat="server" ID="txt_Country" Text='<%#Eval("Country") %>' Font-Bold="false"
Font-Names="Verdana" Font-Size="12px" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Wrap="false" />
<ItemStyle Font-Names="Verdana" HorizontalAlign="Left" Wrap="false" />
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:RadioButton ID="RadioButton1" runat="server" onclick="RadioCheck(this);" />
<asp:HiddenField ID="HiddenField1" Value='<%#Eval("Type") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle BackColor="White" Font-Bold="false" Font-Names="Arial" Font-Size="12px"
CssClass="allcaps" />
<FooterStyle BackColor="#A0A0A0" ForeColor="Black" Font-Bold="false" Font-Names="Arial"
Font-Size="12px" />
<HeaderStyle BackColor="#A0A0A0" ForeColor="White" Font-Bold="false" Font-Names="Arial"
Font-Size="12px" />
<AlternatingRowStyle BackColor="White" Font-Bold="false" Font-Names="Arial" Font-Size="12px"
CssClass="allcaps" />
<SelectedRowStyle BackColor="White" Font-Bold="false" ForeColor="black" />
</asp:GridView>
<asp:Button Text="Submit" runat="server" OnClick="btn_Submit_Click" />
</div>
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[4] { new DataColumn("Id", typeof(int)),
new DataColumn("Name", typeof(string)),
new DataColumn("Country",typeof(string)),new DataColumn("Type",typeof(string)) });
dt.Rows.Add(1, "David", "UK", "0");
dt.Rows.Add(2, "Jhon", "USA", "0");
dt.Rows.Add(3, "Kevin", "USA", "0");
dt.Rows.Add(4, "Peter", "UK", "1");
dt.Rows.Add(5, "Andrea", "USA", "1");
dt.Rows.Add(6, "Anabell", "UAE", "2");
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
Screenshot
