All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
<
ClientSettings
Selecting-AllowRowSelect
=
"true"
/> . . . . .
asp:Button
ID
"Button1"
runat
"server"
Text
"Get Value"
OnClientClick
"Click()"
/>
<script type=
"text/javascript"
>
function
Click()
{
var
grid = $find(
"<%=RadGrid1.ClientID %>"
);
MasterTable = grid.get_masterTableView();
//Access Parent table items
selectedrow = MasterTable.get_selectedItems();
length = MasterTable.get_selectedItems().length;
for
(
i = 0; i < length; i++) {
id = MasterTable.get_selectedItems()[i].get_id();
cell = MasterTable.getCellByColumnUniqueName(selectedrow[i],
"ParentColumnName"
alert(cell.innerHTML);
}
// Access Detail table Items
dataItems = MasterTable.get_dataItems();
i = 0; i < dataItems.length; i++) {
if
(dataItems[i].get_nestedViews().length > 0) {
cell = dataItems[i].get_nestedViews()[0].get_selectedItems()[0].get_cell(
"ChildColumnName"
</script>