Sort while holding Ctrl

Posted by: mfrey43 on 17 January 2018, 12:25 am EST

    • Post Options:
    • Link

    Posted 17 January 2018, 12:25 am EST

    Hi

    If I hold down ctrl and click on a column header it won’t sort. If I understand it correctly this is because ctrl+click should clear the sorting. Is there a way to overwrite this behaviour? I’m subscribed to (sortingColumn) but no event fires if you ctrl+click.

    I have already tried extending the flexgrid class but that leads to a lot of other problems. Could you make an example on how to only overwrite a single method in a subclass?

    Any help would be greatly appreciated.

  • Posted 17 January 2018, 4:02 pm EST

    Hi,

    Currently, ctrl + click do nothing on column header click. You may override the sorting behavior on mousedown event for FlexGrid hostElement. Please refer to the following code snippet for the same:

    flex.hostElement.addEventListener("mousedown",function(e){
    	if(e.ctrlKey){
    		/*clear sorting on ctrl+key*/
    		cvData.sortDescriptions.clear();	
    	}
    },true);
    

    Hope it helps!

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels