Hi Infragistics team,
clearing the sort order with clearSort() (https://es.infragistics.com/products/ignite-ui-angular/docs/typescript/latest/classes/igxgridcomponent.html#clearsort) leaves previusly grouped data in a messy state.
Steps to reproduce:
(Sorting manually again afterwards fixes it. But then it's too late :-))
Any idea how to fix this? Thank you!
Best RegardsMario
Hello Mario,
Thank you for posting in our community.
As mentioned in our components specifications on GitHub, by design the Group By feature requires sorting to be performed on grouped columns.
In order to be able to assist you further I will need some additional information regarding your scenario. Could you please provide me with more details about your use case and elaborate on for what purpose you need to use the clearSort method of IgxGrid?
Looking forward to hearing from you.
Regards,Viktor KombovEntry Level Software DeveloperInfragistics, Inc.
Thank you Viktor for your quick reply!My scenario is a grouped grid with manually sorted columns. I want to remove the sorting of all cloumns (that don't belong to the grouping) by one click.
I could accomplish this by a workaround like
this.grid.visibleColumns.forEach(c => { if (!this.grid.isColumnGrouped(c.field)) { this.grid.clearSort(c.field); }});
But I still think, that clearSort() is buggy, since it doesn't care about grouped cols and hence destroys the grid display.RegardsMario
Hello Viktor,
thank you for quick reply.
In our scenario, we have mutiple sorted colmns on a grouped table and want to clear all these sortings by one click - except the ones that are required for grouping of course.
Regards Mario