Title: numberbox editor in grid, limitations? Post by: chrwei on March 24, 2015, 02:44:42 PM trying to add some "friendliness" to a grid, where when clicking a row the clicked cell gets focus, and also when pressing enter it ends editing. code excerpt below.
This works for editor type=text, but does not for numberbox. the box does not get focus, and keydown event does not register at all, no output on console for any key press on numberboxs. is there a work around? Code: $("#data").datagrid({ Title: Re: numberbox editor in grid, limitations? Post by: stworthy on March 24, 2015, 05:58:44 PM Please refer to this example http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=Row%20Editing%20in%20DataGrid
Title: Re: numberbox editor in grid, limitations? Post by: chrwei on March 25, 2015, 05:54:28 AM that's odd, I was basing it off the row editing demo, but yesterday it used onClickRow, I even copy/pasted that function.
Title: Re: numberbox editor in grid, limitations? Post by: chrwei on March 25, 2015, 06:10:19 AM so textbox('textbox') is the trick. I was able to add the keydown using this in the onClickCell.
Code: $.each($('#dg').datagrid('getEditors', index), function(i, o) { Code: function addKeyHandle(e){ |