views:

26

answers:

1

I have an UltraGrid with checkboxes in one column. I have an event that is fired when one of the checkboxes is clicked (checked or unchecked).

However, I want to set the value of the checkbox through code at a later time. I figured out how to do this by finding the UltraGridCell and doing cell.value = true; or cell.value = false;, but this isn't firing the event, which I need. I also found cell.SetValue(true,something), but I am not sure what to pass into something. The docs are no help, and I can't find an example that does what I want. Any ideas?

A: 

Which event are you using to determine when the value of the cell changes? If you use UltraGrid.AfterCellUpdate, it will fire when the cell value is set programmatically, either with the Value property or the SetValue method. The "something" you're curious about in the 2 parameter overload is a boolean value which indicates whether the value change should go onto the undo stack. If you pass in True, the user can perform an undo on the grid and it will undo your programmatic change. If you just set the Value property, it does not get added to the undo stack.

Mike Dour