Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
Dim windowManager As New RadWindowManager()
Dim window1 As New RadWindow()
If e.CommandName = "Select" Then
Dim selectedRow As GridDataItem = DirectCast(e.Item, GridDataItem)
Session("custid") = selectedRow.GetDataKeyValue("custid")
window1.Width = "800"
window1.Height = "520"
window1.VisibleTitlebar = "false"
window1.VisibleStatusbar = "false"
window1.NavigateUrl = "~/custinfo.aspx?custid=" & Session("custid").ToString
window1.ID = "RadWindow1"
window1.VisibleOnPageLoad = True
window1.ReloadOnShow = "true"
' Set this property to True for showing window from code
RadWindowManager1.Windows.Add(window1)
'Page.Form.Controls.Add(widnow1)
End Sub
<
telerik:RadGrid
AllowAutomaticDeletes
=
"true"
AllowAutomaticInserts
=
"true"
AllowAutomaticUpdates
=
"true"
AutoGenerateEditColumn
=
"true"
DataSourceID
=
"FirstDataSource"
Height
=
"380"
ID
=
"FirstGrid"
OnDeleteCommand
=
"Grid_OnCommand"
OnInsertCommand
=
"Grid_OnCommand"
OnItemDeleted
=
"Grid_OnItemDeleted"
OnItemInserted
=
"Grid_OnItemInserted"
OnItemUpdated
=
"Grid_OnItemUpdated"
OnUpdateCommand
=
"Grid_OnCommand"
runat
=
"server"
>
<
MasterTableView
DataKeyNames
=
"Id"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Id"
DataType
=
"System.Int32"
HeaderText
=
"System Id"
ReadOnly
=
"True"
UniqueName
=
"FirstId"
>
</
telerik:GridBoundColumn
>
<
telerik:GridButtonColumn
ButtonType
=
"LinkButton"
CommandName
=
"Delete"
ConfirmText
=
"Delete this record?\n\nThis action cannot be undone."
Text
=
"Delete"
UniqueName
=
"DeleteFirst"
>
</
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowKeyboardNavigation
=
"true"
EnablePostBackOnRowClick
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
/>
<
Scrolling
AllowScroll
=
"true"
SaveScrollPosition
=
"true"
UseStaticHeaders
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
<
telerik:RadGrid
AllowAutomaticDeletes
=
"true"
AllowAutomaticInserts
=
"true"
AllowAutomaticUpdates
=
"true"
AutoGenerateEditColumn
=
"true"
DataSourceID
=
"SecondDataSource"
Height
=
"380"
ID
=
"SecondGrid"
OnDeleteCommand
=
"Grid_OnCommand"
OnInsertCommand
=
"Grid_OnCommand"
OnItemDeleted
=
"Grid_OnItemDeleted"
OnItemInserted
=
"Grid_OnItemInserted"
OnItemUpdated
=
"Grid_OnItemUpdated"
OnUpdateCommand
=
"Grid_OnCommand"
runat
=
"server"
>
<
MasterTableView
DataKeyNames
=
"Id"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Id"
DataType
=
"System.Int32"
HeaderText
=
"System Id"
ReadOnly
=
"True"
UniqueName
=
"SecondId"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"FirstId"
DataType
=
"System.Int32"
ForceExtractValue
=
"Always"
ReadOnly
=
"True"
UniqueName
=
"FirstId"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridButtonColumn
ButtonType
=
"LinkButton"
CommandName
=
"Delete"
ConfirmText
=
"Delete this record?\n\nThis action cannot be undone."
Text
=
"Delete"
UniqueName
=
"DeleteSecond"
>
</
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowKeyboardNavigation
=
"true"
EnablePostBackOnRowClick
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
/>
<
Scrolling
AllowScroll
=
"true"
SaveScrollPosition
=
"true"
UseStaticHeaders
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
<
telerik:RadGrid
AllowAutomaticDeletes
=
"true"
AllowAutomaticInserts
=
"true"
AllowAutomaticUpdates
=
"true"
AutoGenerateEditColumn
=
"true"
DataSourceID
=
"ThirdDataSource"
Height
=
"380"
ID
=
"ThirdGrid"
OnDeleteCommand
=
"Grid_OnCommand"
OnInsertCommand
=
"Grid_OnCommand"
OnItemDeleted
=
"Grid_OnItemDeleted"
OnItemInserted
=
"Grid_OnItemInserted"
OnItemUpdated
=
"Grid_OnItemUpdated"
OnUpdateCommand
=
"Grid_OnCommand"
runat
=
"server"
>
<
MasterTableView
DataKeyNames
=
"Id"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Id"
DataType
=
"System.Int32"
HeaderText
=
"System Id"
ReadOnly
=
"True"
UniqueName
=
"ThirdId"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SecondId"
DataType
=
"System.Int32"
ForceExtractValue
=
"Always"
ReadOnly
=
"True"
UniqueName
=
"SecondId"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridButtonColumn
ButtonType
=
"LinkButton"
CommandName
=
"Delete"
ConfirmText
=
"Delete this record?\n\nThis action cannot be undone."
Text
=
"Delete"
UniqueName
=
"DeleteThird"
>
</
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"true"
SaveScrollPosition
=
"true"
UseStaticHeaders
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
<
asp:EntityDataSource
ConnectionString
=
"name=Entities"
DefaultContainerName
=
"Entities"
EnableDelete
=
"True"
EnableFlattening
=
"False"
EnableInsert
=
"True"
EnableUpdate
=
"True"
EntitySetName
=
"Firsts"
EntityTypeFilter
=
"First"
ID
=
"FirstDataSource"
runat
=
"server"
>
</
asp:EntityDataSource
>
<
asp:EntityDataSource
ConnectionString
=
"name=Entities"
DefaultContainerName
=
"Entities"
EnableDelete
=
"True"
EnableFlattening
=
"False"
EnableInsert
=
"True"
EnableUpdate
=
"True"
EntitySetName
=
"Seconds"
EntityTypeFilter
=
"Second"
ID
=
"SecondDataSource"
runat
=
"server"
Where
=
"it.[FirstId] = @FirstId"
>
<
WhereParameters
>
<
asp:ControlParameter
ControlID
=
"FirstGrid"
DefaultValue
=
"0"
Name
=
"FirstId"
PropertyName
=
"SelectedValue"
Type
=
"Int32"
/>
</
WhereParameters
>
</
asp:EntityDataSource
>
<
asp:EntityDataSource
ConnectionString
=
"name=Entities"
DefaultContainerName
=
"Entities"
EnableDelete
=
"True"
EnableFlattening
=
"False"
EnableInsert
=
"True"
EnableUpdate
=
"True"
EntitySetName
=
"Thirds"
EntityTypeFilter
=
"Third"
ID
=
"ThirdDataSource"
runat
=
"server"
Where
=
"it.[SecondId] = @SecondId"
>
<
WhereParameters
>
<
asp:ControlParameter
ControlID
=
"SecondGrid"
DefaultValue
=
"0"
Name
=
"SecondId"
PropertyName
=
"SelectedValue"
Type
=
"Int32"
/>
</
WhereParameters
>
</
asp:EntityDataSource
>