Hello Everyone,
When I apply grouping on a column, the grouped column is completely removed from the grid header section. It only appears inside the group row (e.g., Employee Name: (2 items)), but it is no longer visible as a normal column in the grid.
Is there a way to retain the grouped column in data grid header while grouping is applied?
Regards,
Sudharshan
Hi @Sudharshan T,
This is possible by using extensibility, so please check in the future the Wijmo Flexgrid documentation to check if it's possible first.
Currently, you can accomplish this by using the following code in a JSNode in Grid’s block OnInitialize event handler:
// Get grid instance var theGrid = OutSystems.GridAPI.GridManager.GetGridById($parameters.GridWidgetId); // Disable hideGroupedColumns option theGrid.features.groupPanel._groupPanel.hideGroupedColumns = false; // Force visibility whenever the grouping changes theGrid.provider.itemsSource.groupDescriptions.collectionChanged.addHandler(function() { setTimeout(() => { theGrid.provider.columns.forEach(c => c.visible = true); }, 0); // Timeout ensures Wijmo's internal 'hide' logic finished first }); /* $parameters.GridWidgetId being the Grid block identifier */
Final result:
Best Regards,GM
Hi Sudharshan,
That's the behavior by design. I think that the easiest way would be to duplicate the column (however non-sense it might sound).
Best regards,
RG