We are loading the grid through xml. Grouping is used in the grid. When the grid is loaded initially, I want the groups to be collapsed by default.
The following code doesn’t work:
grid.init();
…
grid.collapseAllGroups()
I tried using grid.collapseGroup(val) as well, it doesn’t work too,
Though I use the above code, the groups are expanded by default initially.
is there any other api to be used along with the above?
grid.init();
then i have one button, on click of that i want to collapse all groups,
$(document).on(‘click’, ‘.collapseButton’, function (event) {
grid.collapseAllGroups();
});
the click events and grid.collapseAllGroups(); execute properly, but the groups didn’t collapse.
+Department EmployeeName Salary DateOfBirth
Dept1 Name1 10000 12-1-1980
Dept2 Name2 20000 13-1-1980
Dept3 Name3 30000 14-1-1980
Dept4 Name4 40000 15-1-1980
Dept5 Name5 50000 16-1-1980
Actually i want to create grid like this, want to create + button near header of Department. On Click of that want to collapse all groups.
Unfortunately the problem cannot be reconstructed locally.
Could you please, share a demo link or provide a complete demo, where the problem can be reconstructed.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan