Hi amar,
Refer below sample.
HTML
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="Shipping">
<ItemTemplate>
<asp:RadioButton ID="rbShipping" runat="server" Text='<%#Eval("Shipping") %>' GroupName="g1" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Billing">
<ItemTemplate>
<asp:RadioButton ID="rbBilling" runat="server" Text='<%#Eval("Billing") %>' GroupName="g1" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemTemplate>
<asp:Label ID="lblAddress" runat="server" Text='<%#Eval("Address") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('[id*=rbShipping]').click(function () {
var radio = '';
var address = '';
if ($("[id*=rbShipping]:checked")) {
radio = $("[id*=rbShipping]:checked").closest("td").find('label').text();
address = $(this).closest('tr').find('[id*=lblAddress]').text();
}
alert("Checked radio is: " + radio + "\n\rAddress is: " + address);
});
$('[id*=rbBilling]').click(function () {
var radio = '';
var address = '';
if ($("[id*=rbBilling]:checked")) {
radio = $("[id*=rbBilling]:checked").closest("td").find('label').text();
address = $(this).closest('tr').find('[id*=lblAddress]').text();
}
alert("Checked radio is: " + radio + "\n\rAddress is: " + address);
});
});
</script>
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[] { new DataColumn("Shipping"), new DataColumn("Billing"), new DataColumn("Address") });
dt.Rows.Add("Shipping 1", "Billing 1", "Address 1");
dt.Rows.Add("Shipping 2", "Billing 2", "Address 2");
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
Screenshot