Category / Section
How to expand all child grid in hierarchical Grid
1 min read
Problem
Expanding all child grid in the Hierarchical Grid.
Solution
All the child grid can be expanded by using expandCollapse function in the create client side event.
JS
<script type="text/javascript"> $(function () { $("#Grid").ejGrid({ ------------ pageSettings: { pageSize: 3 }, create: "onCreate", childGrid: { ---------------- pageSettings: { pageSize: 2 }, }, }); }); function onCreate(args) { var detailRow = this.element.find(".e-detailrowcollapse"); for (var i = 0; i < detailRow.length; i++) this.expandCollapse($(detailRow[i])); } </script>
Screen Shot
Fig: Expanded child Grid in Hierarchical Grid