Hello and Happy New Year!
Wishing you all the best for the New Year of 2022.
Would you please let me know if we can have both sorting and grouping features on HtmlDataGrid.
This is for a grid that gets generated in Foxpro by using wwScripting approach and I've been thinking of using HtmlDataGridConfig::OnAfterRowRender for grouping but I'm not sure if we can have the sorting feature for different columns while maintaining grouping.
I would appreciate any tip.
Thanks,
Kathy
You can do grouping via injection using the row rendering events. That should also work if you're sorting, as the sorting happens to the data before it gets rendered. Since the events fire as the data is rendered, it should already be ordered by the time you get the row events to handle the grouping logic. Assuming the grouping logic doesn't change due to the sorting this should just work.
I think one of the samples in the documentation describes grouping via OnBeforeRowRendered()
.