I have a grid that is summary order information, it has its editable mode set to popup.
What I am trying to achieve is that when you 'edit' a row, the edit window pops up with another grid inside it. I cannot for the life of me, figure out how to get this to work, I've tried every template method I could find online. Is this possible?
I am prepared to just have a custom 'edit' button open a kendo window that loads the other grid, I could then refresh the summary grid on the window close event, but I wanted to make sure I could not achieve this though more appropriate methods first.
4 Answers, 1 is accepted
You can create a custom template for the popup editor that contains a Grid, like shown in the following snippet:
To populate this Grid, use the main Grid Edit event:
To ensure that the parent Grid item will be marked as dirty if changes are made only in the child Grid, use the DataSource Change event to apply a dirty flag:
You can find a sample project demonstrating this implementation, attached to this message.
To have the option to add a new record enabled in the Editor template's Grid you would need to specify the Create command within the Grid Toolbar:
@(Html.Kendo().Grid<WebApplication1.Models.TerritoryViewModel>() .Name("TerritoryGrid") .ToolBar(toolbar => toolbar.Create()) )
For your convenience, I am attaching the example modified and demonstrating the above.