Posted 14 September 2017, 11:57 am EST
Hi,
Here are the answers for your questions:
1)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I want to be able to click on a column header and toggle sort by asc, desc, and then none, or remove the sort descriptor. I thought this would be the default behavior, but it doesn’t seem to happen.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
For this, you need to handle sortingColumn event of FlexGrid and check column sort type using currentSort property of Column. If currentSort is ‘-’, cancel sorting and clear sortDescription.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I also want to unselect a selected row if I click on it a second time. Selection changing and changed both do not get invoked since the cell/row is already selected. Any other way to do this?
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
For this, you need to handle selectionChanged and click event. In selectionChanged event, set flag to true. Now in click event check flag, if flag is false, set CollectionView’s currentItem property to null and if true, set flag to false.
For reference, please see the attached sample crated using PureJS that implements the same.
Thanks,
Manish Kumar Gupta
2017/04/FlexGrid_customSort_click.zip