I have a radgrid in my .aspx page. I'm having a checkbox inside the GridTemplateColumn. On the checkbox onclick event I am calling the javascript function chkRowSelection(this). In that function I need to get the values of the radgrid ClientDataKeyNames="SRC,SER,BAND,XLA,XLG,RGN,STT,EIP,SVC,FRQ,FTA" for the row checked. Could you please help me to achieve this.
<
telerik:RadGrid ID="grdResult" runat="server" Width="900px"
AllowMultiRowSelection="True" AllowSorting="True" Height="400px"
style="margin-right: 1px" Skin="WebBlue" GridLines="None" AllowPaging="true" PageSize="100">
<PagerStyle Position="Top" />
<MasterTableView AllowPaging="true" AutoGenerateColumns="true" AllowMultiColumnSorting="true" ClientDataKeyNames="SRC,SER,BAND,XLA,XLG,RGN,STT,EIP,SVC,FRQ,FTA" Font-Size="Smaller" PageSize="100" >
<Columns>
<telerik:GridTemplateColumn UniqueName="SEL">
<HeaderTemplate>
<asp:CheckBox runat="server" ID="ChkAll" ToolTip="Click to select all" onclick="javascript:SelectAllCheckboxes(this);" />
</HeaderTemplate>
<HeaderStyle Width="20px" />
<ItemTemplate>
<asp:CheckBox runat="server" ID="SEL" onclick="javascript:chkRowSelection(this);" />
</ItemTemplate>
<ItemStyle Width="20px" />
</telerik:GridTemplateColumn>
</Columns>
<ItemStyle Wrap="false" />
<HeaderStyle Wrap="False" />
</MasterTableView>
<HeaderStyle Wrap="False" />
<ClientSettings ReorderColumnsOnClient="true" EnableRowHoverStyle="False" AllowColumnsReorder="true" >
<Scrolling AllowScroll="True" UseStaticHeaders="true" />
<Selecting AllowRowSelect="true" />
<Resizing EnableRealTimeResize="true" ResizeGridOnColumnResize="true" AllowColumnResize="true"/>
<ClientEvents OnRowContextMenu="grdResult_RowSelected" OnRowClick="RowClicked" />
</ClientSettings>
<Headerstyle Width="65px" />
<PagerStyle Mode="NextPrevAndNumeric" ></PagerStyle>
</
telerik:RadGrid>
javascript:
function chkRowSelection(chkBox)
{
// need to get the values of the ClientDataKeyNames="SRC,SER,BAND,XLA,XLG,RGN,STT,EIP,SVC,FRQ,FTA" for the selected row in this function.
}
Thanks,
Raji