I would want to make all the groups collapsed on default. Is there a solution for this?
My version of data grid is 2.9.0
Hello @Juween
You need to pass the index on the collapseGroupsToLevel method:
const grid = OutSystems.GridAPI.GridManager.GetActiveGrid($parameters.GridWidgetId); grid._provider.collapseGroupsToLevel(0);
Check the example attached where this is the end result:
If you want to have this everytime you drag a column into the panel you need to add an event listener to call the same method to collapse it.
Cheers,GM
Hi Juween,
If my understanding of your use case is correct, I attempted to create a sample implementation, and I noticed that the groups are collapsed by default. However, you can try executing the following JavaScript code in the Grid OnInitialize event handler to explicitly collapse the groups.
JS Snippet:
const grid = OutSystems.GridAPI.GridManager.GetActiveGrid($parameters.GridWidgetId); grid._provider.collapseGroupsToLevel();
I hope this helps you!
Kind regards,
Benjith Sam
Hi Benjith,
Thank you for your response.
Tried your solution and it is still not working for me.
I have attached my oml, would really appreciate if you could help checking my application
Thank you,
Zureen.