when i set up the client side EditKeyDownHandler for the ultrawebgrid and i use the WebDateChooser or WebNumericEdit as the editor controls (columntype.custom) and use the tab key to leave those controls the event isn't called. However it is called when i used the dropdownlist (columntype.dropdownlist).
In the end i know i can use the editkeydown events for those custom controls but i need to know what the active cell is...
any thoughts
Hello,
You can use the CSOM (client side object model ) of the UltraWebGrid component to get the active cell for example:
var grid = igtbl_getGridById('<%=UltraWebGrid1.ClientID %>');
var activeCell = grid.getActiveCell();
As a reference for the CSOM you can take a look at this link:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.2/CLR3.5/html/WebGrid_CSOM.html
Cool that works... now how do i determine if the shift key is being held down for any of the client side Keydown functions?
The third argument of the function is the key code of the pressed button.
You can use code like this :
function EditKeyDownHandlerFunc(gridId, cell, keyCode) {
if (keyCode == 16) {
alert('SHIFT is pressed ');
}
More information about the event you can see here:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.2/CLR3.5/html/Infragistics35.WebUI.UltraWebGrid.v9.2~Infragistics.WebUI.UltraWebGrid.ClientSideEvents~EditKeyDownHandler.html
I already have that part figured out the problem is i want to know when both the SHFT + Tab keys are pressed together... in other words combination keys.
I am not sure what is your scenario and whether this is useful for you but you can use this code for example:
Assume that Shift and Tab keys are pressed before go to the edit mode of the Cell:
debugger;
//true if shift key is pressed
var pressed = window.event.shiftKey;
//the code of the second key
var obj = window.event.keyCode;
//var res = String.fromCharCode(key).toLowerCase()