
3 Answers, 1 is accepted
Hello,
Could you please confirm which product is being used - Kendo UI for Angular or UI for PHP, so we could provide relevant information about the scenario?
I am looking forward to hearing from you.
Regards,
Dimiter Madjarov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hello,
A row of the second grid can be programmatically closed/opened when the user interacts with the first grid. However, this is a functionality that should be additionally implemented.
For instance, within the detailExpand and detailCollapse, you should access the corresponding row in the second grid. After that, you should expand it or collapse it by passing its TR element to any of the following methods:
- https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/expandrow
- https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/collapserow
Let me know if additional information is required.
Kind regards,
Tsvetomir
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi,
The connection between the two grids could happen via the API methods mentioned earlier. You could check out the following POC that demonstrates the collapse/expand relationship between two grids:
https://dojo.telerik.com/eVUjAhET
The logic could be extended to feature the multilevel expand/collapse. For N-level hierarchies, you might want to use recursion and first go up to the first level and then drill down on the second grid.
Regards,
Tsvetomir
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
The get() method of the data source would work out only for the field that has been specified in the schema.model.id property.
If you would like to access the data item by another field, you would have to loop through the data items of the respective grid manually and obtain the item. The data() method of the data source returns the data set and you could loop over it.
There are several approaches that you could undertake. The first one would be to assign different event handlers for the detailCollapse and detailExpand events to each level of the grid hierarchy. So that the logic for the inner grids would be similar to the one for the two main grids.
Alalternatively, you could recursively check if the current grid is nested inside another grid by using the jQuery closest() method and using the "[data-role='grid']" selector.
The third option would be to give names to the detail grids inside the detailInit method and make sure that the detail grids from the first hierarchy have similar names to the grids for the second hierarchy. For instance, if you are inside a grid with ID "grid_firstname_1", you should be looking for a grid with ID "grid_firstname_2" in the second hierarchy.