Hi,
I've managed to make a grid work with a subgrid and popup admin forms for the two levels. Now that I have it largely working I am looking at making it more usable for the end user. As it stands with command bars it looks very complex so I've kept the command bar on the top of the grid, that is fine for adding new elements to level 1. On the second level I decided that the command bar was wasting too much space so I have put a + button in each row in level 1 - this can be seen in the attached screenshot.
The problem that I have is by moving the + button to the row the code that handles default checkbox config on the form template now fails. My insert form code is shown below - the top part handles creation of the form for the level 1 grid while the second one (with a renamed CommandName) needs to open the child grids insert form.
I think that I'm just tired but cannot figure out howto get the child form open.
Any pointers?
Regards,
Jon
I've managed to make a grid work with a subgrid and popup admin forms for the two levels. Now that I have it largely working I am looking at making it more usable for the end user. As it stands with command bars it looks very complex so I've kept the command bar on the top of the grid, that is fine for adding new elements to level 1. On the second level I decided that the command bar was wasting too much space so I have put a + button in each row in level 1 - this can be seen in the attached screenshot.
The problem that I have is by moving the + button to the row the code that handles default checkbox config on the form template now fails. My insert form code is shown below - the top part handles creation of the form for the level 1 grid while the second one (with a renamed CommandName) needs to open the child grids insert form.
I think that I'm just tired but cannot figure out howto get the child form open.
Any pointers?
Regards,
Jon
Private
Sub
uxRadGrid_ItemCommand(
ByVal
source
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridCommandEventArgs)
Handles
uxRadGrid.ItemCommand
If
e.CommandName = Telerik.Web.UI.RadGrid.InitInsertCommandName
Then
e.Canceled =
True
Dim
newValues
As
System.Collections.Specialized.ListDictionary =
New
System.Collections.Specialized.ListDictionary()
newValues(
"ShowTotal"
) =
False
newValues(
"IncludeInGrandTotal"
) =
False
e.Item.OwnerTableView.InsertItem(newValues)
ElseIf
e.CommandName =
"InitInsertElement"
Then
e.Canceled =
True
Dim
newValues
As
System.Collections.Specialized.ListDictionary =
New
System.Collections.Specialized.ListDictionary()
newValues(
"IncludeInTotal"
) =
False
' FOLLOWING LINE CRASHES BECAUSE IT IS INSERTING IN THE LEVEL 1 GRID - NOT THE CHILD GRID.
' NEED CODE FOR OPENING CHILD INSERT FORM
e.Item.OwnerTableView.InsertItem(newValues)
ElseIf
(e.CommandName =
"Update"
OrElse
.... rest irrelevant