I am using editor template for child grid column. It is rendering for the first child grid. Like seeing in attached picture it is not rendering for the second child grid.
columns.Bound(p => p.RoleId).EditorTemplateName("UserRole").Title(ViewBag.Location).ClientTemplate("\\#:RoleName\\#");
5 Answers, 1 is accepted
The described behavior is expected as the child grids have the same configuration, thus their editor names are the same. In other words, it is not possible to have two rows opened in edit mode simultaneously. A possible workaround would be to exit edit mode in all child grids before editing.
Thanks for the work around.
You cannot say the behavior is expected. Accept it as a bug.
The MVC wrappers basically generate some HTML and a initialization script which creates a jQuery widget. You can find further information regarding the server wrappers in the following article:
Please note that the name of the wrapper is then used as an id to the element which the initialization script uses to create the widget. In the context of a hierarchy grid, all child grids are basically different instances of the same grid, thus the names of the editor widgets are the same. Therefore, if you have 2 grids in edit mode, the DOM will contain few elements with the same ids - which is invalid as the id selector will always return the first occurrence and the editors within the other rows will not initialize.
Yes, that is a bug as per your design.
Well, kendo allowing edit functionality on child grid. Also editor template option ( Drop down list)
Then it is your responsibility to work properly. Client is laughing at me. QA team won't pass it. I cannot say editing one grid at a time is allowed.
The `hierarchical grid` is basically a standard grid with a detail template which contains another grid. The parent grid is not aware of those child grids, neither is the child grid aware of the parent grid. In other words the instances of those grids are not related in anyway and such limitations might occur. We will violate the separation of concerns principle if we include logic within our grid which checks whether there are any other grids surrounding it. In other words, the `hierarchical grid` is not a single component for displaying hierarchical data but a standard grid with detail template.
For displaying hierarchical data, we provide the TreeList component. You can test it in the following demo: