Hi, I have an hierarchical grid. masterTableView and DetailTables.
DetailTables has a GridClientSelectColumn that allows to select rows (multiselection)
any time a row is selected I would like to get all the selected rows collection. Think can use selectedIndexChanged...
In the away here above I find all IDSlot (child) selected values but I don't know how to find their IDResource (parent)
Thank you
DetailTables has a GridClientSelectColumn that allows to select rows (multiselection)
<
telerik:RadGrid
ID
=
"RadGridResources"
runat
=
"server"
Width
=
"950px"
ShowStatusBar
=
"true"
AutoGenerateColumns
=
"False"
PageSize
=
"7"
AllowSorting
=
"True"
AllowMultiRowSelection
=
"True"
AllowPaging
=
"True"
>
<
PagerStyle
Mode
=
"NumericPages"
></
PagerStyle
>
<
MasterTableView
Width
=
"100%"
DataKeyNames
=
"IDResource"
AllowMultiColumnSorting
=
"True"
HierarchyDefaultExpanded
=
"true"
>
<
DetailTables
>
<
telerik:GridTableView
DataKeyNames
=
"IDSlot"
Name
=
"Slot"
Width
=
"100%"
>
<
Columns
>
<
telerik:GridClientSelectColumn
HeaderStyle-Width
=
"40px"
UniqueName
=
"CheckboxSelectIDSlotColumn"
>
<
HeaderStyle
Width
=
"40px"
/>
</
telerik:GridClientSelectColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"IDSlot"
HeaderText
=
"IDSlot"
HeaderButtonType
=
"TextButton"
DataField
=
"IDSlot"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"Code"
HeaderText
=
"Code"
HeaderButtonType
=
"TextButton"
DataField
=
"Code"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"Description"
HeaderText
=
"Description"
HeaderButtonType
=
"TextButton"
DataField
=
"Description"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
<
Columns
>
<
telerik:GridBoundColumn
SortExpression
=
"IDResource"
HeaderText
=
"IDResource"
HeaderButtonType
=
"TextButton"
DataField
=
"IDResource"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"Code"
HeaderText
=
"Code"
HeaderButtonType
=
"TextButton"
DataField
=
"Code"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"Description"
HeaderText
=
"Description"
HeaderButtonType
=
"TextButton"
DataField
=
"Description"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
enablePostBackOnRowClick
=
"true"
>
<
ClientEvents
/>
<
Selecting
AllowRowSelect
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
any time a row is selected I would like to get all the selected rows collection. Think can use selectedIndexChanged...
Protected Sub RadGridResources_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGridResources.SelectedIndexChanged
Try
Dim selectedItems As New ArrayList
Dim idSlot As Long
For i = 0 To RadGridResources.SelectedItems.Count - 1
Dim dataItem As GridDataItem = RadGridResources.SelectedItems(i)
idSlot = dataItem("IDSlot").Text
selectedItems.Add(idSlot)
Next
'TO DO
Catch ex As Exception
End Try
End Sub
In the away here above I find all IDSlot (child) selected values but I don't know how to find their IDResource (parent)
Thank you