I need a jqxGrid, where we have an editable number column. The numbers can be set or not set i.e. nothing displayed in the cell.
(since my code example is angularjs, I posted it here)
The first problem was how to achieve that we can clear the value in a general jqxNumberInput by pressing delete key.
I found this forum post: http://www.jqwidgets.com/community/topic/allownull-and-clearing-value-on-keyup/
with this solution: http://jsfiddle.net/txhi/fp1zwg7k/
I thought that I can adapt it easily to the jqxNumberInput in my grid editor.
As you can see in the linked example below, it basically works; the value can be deleted by pressing delete key but as soon as we exit the editor by clicking outside of the grid, 0.00 is set again. Why? I explicitly set allowNull: true
in the initeditor
function.
https://www.jseditor.io/?key=grid-input-editor-clear-value
There is even a second problem: If we once pressed delete, we can no more enter numbers unless the cell editing is finished (i.e. editor closed) and cell is brougth in edit mode again. This is also no problem in the fiddle linked above (http://jsfiddle.net/txhi/fp1zwg7k/).
Please help me getting this to work as expected!
Thank you in advance.
Best regards,
– badera