I am evaluating the jQWidgets for a new web application project I am currently working on.
I have just come up with the following issue when using the jqxGrid control:
I put two jqxGrids in a web page, along with other form (standard input) controls. The two grids are editable with { editmode: ‘selectedrow’, selectionmode: ‘singlerow’ }. I edit one cell value (default editor is a textbox) in the first grid and without pressing “Enter” or “Esc”, or clicking on another row inside the grid, I edit a cell value in the other grid. Then I click on another input control on the page.
The two grids are in a “semi-editing” state now. The edited rows have a blue border around them. Using JS console.log() I can see that a ‘cellbeginedit’ event has been triggered for each one of the grids, but no ‘cellendedit’ events are fired! If I hit “Enter” or “Esc” now (with the focus still on the third control), both grids are back in row-selection mode and their new values are either committed or discarded. Furthermore, the two ‘cellendedit’ events are now fired.
I just wanted to know if this behavior is by design or I am missing something. I would expect that since a grid cell editor gets out of focus (‘onblur’ or ‘onfocusout’ event), its new value should be either committed or discarded, without any further action required by the user. I read the following in the jqGrid demo page:
To cancel the cell editing, press the “Esc” key. To save the changes press the “Enter” key or select another Grid cell.
But what about selecting another control on the page?
Thank you for your time.