Hello,
I have a RadGrid and I would like to capture the DataKeyValue (AssignmentID) of each selected row (the user selects a row via the GridClientSelectColumn). In short, when a user selects a row, I want to capture each row's corresponding AssignmentID and store that value in a hidden field on my webpage. I will then use these values in a RadWindow popup.
I am assuming doing this on the client side using Javscript would be the best route? Can you please provide a code sample? Thank you in advance!
Jason
Here is my ASP.NET code:
I have a RadGrid and I would like to capture the DataKeyValue (AssignmentID) of each selected row (the user selects a row via the GridClientSelectColumn). In short, when a user selects a row, I want to capture each row's corresponding AssignmentID and store that value in a hidden field on my webpage. I will then use these values in a RadWindow popup.
I am assuming doing this on the client side using Javscript would be the best route? Can you please provide a code sample? Thank you in advance!
Jason
Here is my ASP.NET code:
<asp:Panel ID="pnlAssignmentSearch" CssClass="PanelContainer" Visible="False" runat="server"> |
<telerik:RadGrid ID="radgrdAssignment" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" AllowMultiRowSelection="True" ShowStatusBar="False" PageSize="20" GridLines="None" HorizontalAlign="NotSet" runat="server"> |
<MasterTableView DataKeyNames="AssignmentID"> |
<Columns> |
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn"></telerik:GridClientSelectColumn> |
<telerik:GridButtonColumn ButtonType="LinkButton" DataTextField="AssignmentID" SortExpression="AssignmentID" HeaderText="EvalID" UniqueName="AssignmentIDButton" CommandName="Select"></telerik:GridButtonColumn> |
<telerik:GridBoundColumn DataField="AssignmentID" HeaderText="AssignmentID" UniqueName="AssignmentIDData" Display="False"></telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
<ClientSettings EnableRowHoverStyle="True" ClientEvents-OnColumnClick="AppendAssignmentIDs" ClientEvents-OnRowClick="AppendAssignmentIDs"> |
<Selecting AllowRowSelect="True" /> |
</ClientSettings> |
<pagerstyle mode="NextPrevAndNumeric" AlwaysVisible="True" /> |
</telerik:RadGrid> |
</asp:Panel> |