Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ulrich on Jun 18, 2007 14:22
open dhtmlx forum
Invoke editing in dhtmlxGrid

Hello !

Is it possible that dxhtmlGrid starts column editing when pressing any key, not just F2 ?
The intention is that the user can navigate using the keyboard and type directly new values in the cell.

Thanks,

Ulrich
Answer posted on Jun 18, 2007 14:45
Grid has onKeyPress event which can be used for such purpose, code will look similar to next


mygrid.attachEvent("onKeyPress",function(key){
    if (key==MY_KEY_CODE){
       mygrid.editCell(); //switch current cell to edit state
       return false; //block default action
    }
});
Answer posted by sematik (Support) on Dec 07, 2014 16:28

To find more precise comments upon this issue, we can offer you read about javascript rich text editor tutorial and grid controls.