Posted 10 May 2018, 11:22 pm EST
Hello Wijmo Support Group. We want to deactive or deploy some key combinations in FlexGrid. For example: when the home button is pressed it passes to the first line on the Grid. But, we want to change it ctrl+home
Forums Home / Wijmo / General Discussion
Posted by: productinfo on 10 May 2018, 11:22 pm EST
Posted 10 May 2018, 11:22 pm EST
Hello Wijmo Support Group. We want to deactive or deploy some key combinations in FlexGrid. For example: when the home button is pressed it passes to the first line on the Grid. But, we want to change it ctrl+home
Posted 12 May 2018, 8:01 pm EST
I’m still waiting for answers
Posted 13 May 2018, 6:29 pm EST
Hi,
There’s no direct way to accomplish this. We will need handle the KeyDown Event handler and cancel Home button execution. Secondly we will need to add another custom Key event for ctrl+home and then select the First line of the Grid via code.
I am working on it. I should have sample ready by tomorrow.
Posted 14 May 2018, 4:25 pm EST
Hi,
With Build version 5.20181.436, the Home key select first column for that row. But the Ctrl+Home key combination, select the First line and first column.
If you would like to change the current behavior, you should handle keydown event as suggested by @Abhishek.dutta.
Please refer to the following code snippet and attached sample for the same:
flex.hostElement.addEventListener("keydown",function(e){
if(e.keyCode==36 && e.ctrlKey) {
e.preventDefault();
flex.select(flex.selection.row,0);
}
},true);
~Manish