As seen from the example below it's possible - to sort column by click on row header, not on sort icon. It works even with commented
https://stackblitz.com/edit/igx-grid-column-header-event-handling-issue-when-movable-dfwfyj?file=src/app/grid/grid-sample-pinning/grid-pinning.component.html
But I can't figure out how to achieve this in my grid. Are there any special settings to sort column by click at any region of column header?
Hello Andrew,
Thank you for contacting Infragistics Community!
A behavioral change in the way sorting is triggering on columns in the igxGrid’s was introduced with IgniteUI for Angular version 9.1 release. From this version on, sorting is performed by clicking exclusively on the sorting indicator. In case the columns should be sorted via clicking on the entire header additional logic should be implemented. Please take a look at the following sample I have prepared for you. As you can observe, I have templated the headers and attached a pointerdown listeners (This event is suitable for the scenario when Moving feature is enabled. In case you are not using Moving feature the click of the header can be handled). Then in the onHeaderClick method I check if the column has been already sorted or not and I change the sorting direction accordingly.
If this sample is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me for further investigation.
Looking forward to hearing from you.
Best Regards, Martin Evtimov Entry Level Software Developer Infragistics, Inc.
Hello, Martin. The sample that you provided does exactly what I need.Your support is really awesome. Thank you.