Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
WebDataGrid - set_value on cell causes CellValueChanging event to refire
posted

With the old UltraWebGrid, we can update a cell in the grid like this:

cell.getRow(i).getCellFromKey(

 

'Included').setValue(false, false);

The second false parameter stopped the change event from refiring.

With the new grid, I do:

row.get_cellByColumnKey(

 

'Included').set_value(false, false);

The second parameter is not being honored.  As soon as this line executes, it breaks out of my code and goes back to the top of the CellValueChanging event. 

How can I stop the new WebDataGrid from firing change events when I update grid cell values "behind the scenes" in my Javascript.  We only want the event to fire when the user actually updates something in the grid.

Thanks

Parents
No Data
Reply
  • 33839
    posted

    The second parameter is actually the text to display in the cell (or for checkboxes, the check state (0, 1, 2)).  You should simply have an if statement to only set the value of the other cell if the cell that is changing is NOT from that same column.  That way you do not get an inifinite loop.

    regards,

    David Young

Children
No Data