When the Activation behaviour is enabled in a WebDataGrid, the default behaviour when the ENTER key is pressed is to move to the cell below.
Can this be disabled/overridden? i.e. The active cell does not move down and remains as is.
We want to use the grid like a selection list. We want to use the ENTER key to popup a modal dialogue containing data relating to the selected row. Having the highlighted row move down by one row after returning from the modal popup would be confusing.
Hello Yen-Po,
Did you find any solution for this?
Regards,
Shibin Jacob
I have opened a case for this matter and will look further into this matter and update you through the case. You can view your case here:
https://es.infragistics.com/Membership/MySupport.aspx
Mike,
The solution you previously proposed was fine for IE7 & 8.
But this solution does not work for IE9 or Firefox as the grid KeyDown event now fires AFTER the cell has already changed. Therefore, the flag to indicate the ENTER key was pressed does not get set properly, and the Cell Changing Event will not be cancelled at the correct moment.
Is there a solution to this problem for IE9 and Firefox?
Thanks,
Yen
Thanks Mike,
Just what I was looking for.
Hello yen,
Thank you for your patience. This can be achieved by handing the client side Grid_KeyDown and Activation_ActiveCellChanging. In the Grid_KeyDown you will check the keyCode against the key code for the enter key if it matches you will set a var that will track this. In the Activation_ActiveCellChanging you will check this then if it is the enter key you will cancel the event. I have attached a sample to demonstrate this behavior.
Please let me know if I may be of further assistance with this matter.