1

I am currently using SlickGrid in my app. The problem that I am having is invoking the onCellChange when I click a button. When I click on a cell, enter a value and move to another cell it will invoke the onCellChange event.

But when I click on a cell and then click on a button on the page, I need the OnCellChange event to fire. Any way of accomplishing this?

What we are currently doing is when a value has changed in the cell, we save that as a shadow value to the server. And then a person can commit those shadow values. The problem that I have is you can change a cell value then hit a commit button. At this point the OnCellChange doesnt fire, so that shadow value for that cell has not been saved to the server.

Personally I don't agree with the way we are doing it, but that is out of my control

Thanks. John

4

3 回答 3

2

只需在单击按钮时调用这些行,如果有任何活动单元格,它将触发 onCellChange 事件。它为我工作。

    如果(grid.getActiveCell()){
        var row = grid.getActiveCell().row;
        var cell = grid.getActiveCell().cell;
        grid.gotoCell(行,单元格,假);
    }
于 2013-08-08T03:34:43.343 回答
1

我能够通过调用以下方法来解决我的问题。

Slick.GlobalEditorLock.commitCurrentEdit();

于 2013-08-06T20:26:59.907 回答
1

只需在单击按钮时调用此行。

args.commitChanges();

这将触发 SlickGrid 的 onChange 事件

于 2013-09-11T07:40:25.693 回答