WebDataGrid - set_value on cell causes CellValueChanging event to refire

Answered (Not Verified) This post has 0 verified answers | 2 Replies | 3 Followers Thread's RSS feed.

qz55p6
Points 35
Replied On: Tue, Jun 5 2012 10:19 AM Reply

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

  • Post Points: 35

All Replies

gsashev
Points 7,486
Answered (Not Verified) Replied On: Wed, Jun 13 2012 11:12 AM Reply
Suggested by gsashev

Hi qz55p6.

 

Here you can find the classes needed:

http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebDataGrid~Infragistics.Web.UI_namespace.html

 

set_value() is function that has only one parameter and this is the new value that needs to be set. That`s why using it in the way you mention throws an exception.

 

I hope it helps.

Looking forward to hear from you.

 

Sincerely,

Georgi Sashev

Developer Support Engineer

Infragistics, Inc.

http://www.infragistics.com/support

  • Post Points: 5
AgentD5
Points 33,384
Replied On: Wed, Jun 13 2012 12:10 PM Reply

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

  • Post Points: 5
Page 1 of 1 (3 items) | RSS