Hi everyone
I am tryin to get the selected index from this gridview while selecting the
radiobuttonlist . I dont want to use a button for the row though. Anyone
knows how to do this?
thnks
Eric
<%@ Page Language="VB" %>
<script runat="server">
Protected Sub rbl_SelectedInd exChanged(ByVal sender As Object, ByVal e As
System.EventArg s)
Dim index As Integer
End Sub
</script>
<html>
<body>
<form id="form1" runat="server">
<table width="100%">
<tr>
<td style="width: 50%">
<asp:GridView ID="CustomersGr idView" DataSourceID="C ustomersSource"
AllowPaging="tr ue"
AutoGenerateCol umns="false" runat="server">
<Columns>
<asp:BoundFie ld DataField="Cust omerID" HeaderText="Cus tomer ID" />
<asp:BoundFie ld DataField="Comp anyName" HeaderText="Com pany Name" />
<asp:BoundFie ld DataField="City " HeaderText="Cit y" />
<asp:TemplateFi eld>
<ItemTemplate >
<asp:RadioButto nList ID="rbl" runat="server" AutoPostBack="t rue"
OnSelectedIndex Changed="rbl_Se lectedIndexChan ged">
<asp:ListItem >
one
</asp:ListItem>
<asp:ListItem>t wo</asp:ListItem>
</asp:RadioButton List>
</ItemTemplate>
</asp:TemplateFie ld>
</Columns>
</asp:GridView>
</td>
<td style="vertical-align: top; width: 51%">
</td>
</tr>
</table>
<asp:SqlDataSou rce ID="CustomersSo urce" SelectCommand=" select * From
Customers"
connectionstrin g="<%$ ConnectionStrin gs:NorthWindCon nectionString%> "
runat="server" />
</form>
</body>
</html>