How can I get the row object based upon the checking of a check box?
I'm using
<ItemTemplate>
<asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox>
</ItemTemplate>
And I have
Protected Sub ToggleRowSelection(ByVal sender As Object, ByVal e As EventArgs)
CType(CType(sender, CheckBox).NamingContainer, GridItem).Selected = CType(sender, CheckBox).Checked
End Sub
I've seen
http://www.telerik.com/community/forums/aspnet-ajax/grid/add-selected-items-to-an-arraylist.aspx
and I've added
OnItemCommand to the RadGrid but it does not seem to fire. What I need to end up with is something like:
Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
Dim PMID As String = DataItem.OwnerTableView.DataKeyValues(dataItem.ItemIndex)("PMID").ToString
Is there a way to put this in the ToggleRowSelection event?