what should i give for numbers when defining custom operation for edit.
Hello,
You can pass string with desired number (or combination of number and another key) into addHotKey method. For example:
webix.UIManager.addHotKey("9+ctrl", function(view){
var pos = view.getSelectedId();
view.edit(pos);
}, mygrid);
Nice, Thanks for the reply. But if i have to use all the numbers ie., 1,2,3,4,5,6,7,8,9,0
. example - webix.UIManager.addHotKey("0123456789", function(view){ ... });
. how can this operation be achieved ? i have tried but could not make it work.
You can’t define may keys at once.
You can define multiple handlers with multiple addHotKey calls, or just use onKeyPress event of datatable
but the tab’s operation cant be performed, webix.UIManager.addHotKey("Tab", function(table, e) { var pos = table.getSelectedId(); table.edit(pos); },dtable);
this will jut foucs the editor and its uneditable, how can i make next cell editable when i press tab?
dtable.attachEvent("onKeyPress", function(code, e){ if(code == 48 || code == 49 || code == 50 || code == 51 || code == 52 || code == 53 || code == 54 || code == 55 || code == 56 || code == 57 || code == 58) { var pos = this.getSelectedId(); this.edit(pos); }
when i press the tab though it goes to next cell(its default op.) but the values are not being written into the cell even though the control is going into onKeyPress
.
By default you already have tab navigation enabled, it must not require any extra coding.
Please share a snippet or a demo link if some issue still occurs.
It is caused by using “clipboard” property.
It is a bug in Webix 2.2 and it will be fixed in the next build.
http://webix.com/snippet/255fc092
you can see in this snippet, i have added a hot key 1 after i click tab the next cell is uneditable