Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by soms on May 20, 2009 00:34
open dhtmlx forum
Moving around the grid cells with keyboard keys.

Hi

We want to move around the grid cells with the help of keyborad keys(as in Excel). To achieve this we included "dhtmlxgrid_keymap_excel.js" and put "grd.enableEditEvents(true,true,true);". With this we can achieve moving around but its causing lot of other problems like SHIFT+TAB is not moving up by a row, single click is opening the cell rather than double click, in some cases txt column doesnt automatically open on TAB, we have to click on it to open. Any idea what is causing this? If not can you please suggest a better method of achieving moving aroung the grid cells with keyboard.


Thanks in Advance
Soumya
Answer posted by Support on May 20, 2009 03:58
>>single click is opening the cell rather than double click
caused by 
grd.enableEditEvents(true,true,true);
just change it to 
grd.enableEditEvents(false,true,true);

>>like SHIFT+TAB is not moving up by a row
This is part of keymap, it mimic the Excel app. , where shift-tab not change the active row as well. 

>> in some cases txt column doesnt automatically open on TAB
If issue still occurs for you - please provide any kind of sample where problem can be reconstructed ( you can send a sample directly to support@dhtmlx.com ) 

List of key-actions in case of "excel" keymap

Enter + Ctrl - disables cell editor, there is no moving to any cell; 
Enter+Shift - disables cell editor, selects cell located up relative to the current one;
Enter - disables cell editor, selects cell located down relative to the current one;
Tab - disables cell editor, selects the next right cell;
Tab+Shift - disables cell editor, selects the previous left cell; 
F2 - enables cell editor;
ESC - disables cell editor, input value is not saved;
PgUp - moves to the previous page;
PgDow - moves to the next page;
Left-Arrow - selects the left cell;
Right-Arrow - selects the right cell;
Up-Arrow - selects the cell up;
Down-Arrow - selects the cell down;
Ctrl + Left-Arrow - selects the first cell in the string;
Ctrl + Right-Arrow - selects the last cell in the string;
Ctrl + Up-Arrow - selects the first cell in the column;
Ctrl + Down-Arrow - selects the last cell in the column; 
Shift + Up-Arrow, Shift + Down-Arrow - massive strings selection; 
Ctrl + Shift + Down-Arrow - selects all the strings from the current one to the last one;
Ctrl + Shift + Up-Arrow - selects all the strings from the current one to the first one;
Home - selects the first cell in the current string;
End - select the last cell in the current string;
Ctrl + Home - selects the first cell in grid (at the top on the left)âûäåëÿåòñÿ ñàìàÿ ïåðâàÿ ÿ÷åéêà ãðèäà (ñàìàÿ âåðõíÿÿ ëåâàÿ); 
Ctrl + End - selects the last cell in grid (at the foot on the right).