2

I have a editable wijmo grid that works pretty good but there is a problem that continues to stump me and makes users upset.

When you double click to edit a cell, after it's been edited, the AfterCellUpdate (AfterCellEdit or any other) event is never triggered if you click anywhere on the page that is outside of the actual grid; events do fire if you click inside the grid.

This has proved to be rather inconvenient since I need to process the underlying data every time cell data is changed and it is common for a user to double click, edit the data, and then click the save button without clicking inside the grid (and it makes sense to me that they should be able to do that).

Of course, the data doesn't get saved because it doesn't appear to have been changed in the data source; this doesn't make them happy :-)

It does save the data properly if they click in the grid and then click save.

Can someone PLEASE shed some light into this rather perplexing issue???

BTW, I saw similar behavior in some of the sample code that comes with the product; I mean when editing if I clicked outside the grid it stays in edit mode on the cell being edited.

David Husnian
  • 135
  • 2
  • 6

1 Answers1

2

Wijmo grid saves the data when the current cell changes. To save data on clicking the save button without having to click inside the grid, you could call the endEdit method of the grid on the save button click.

    $("#btnSave").click(function(){
       $("#grid").wijgrid("endEdit");
    });
AbdiasM
  • 613
  • 4
  • 15