Hi,
I've added a checkbox column in the ultragrid using grid designer, the problem is that the cell click event is behaving abnormally as i'am trying to toggle the checkbox state,and its not firing events related to cell like cell change , cell update events as desired, mean to say that some times checkbox changes state but no event get fired and sometimes all concerned event get fired .Do any body has any idea what should be the cause of the problem??
The checkbox cell behaves like any other cell. The events are being fired only when the cell loses focus. I think this is not intuitive for a checkbox, so for any grid I have I use the cellclick event and I call PerformAction(ExitEditMode) if the column.StyleResolved is a checkbox.
Where to call PerformAction(ExitEditMode)
I have a button outside the grid. On the click event of the button I update the grid values and call
PerformAction(ExitEditMode) and updategrid , this works file and the cell value is updated.
But i have a check-box column in the grid, on the click of the check-box , the cellchange event should fire. If it is not firing...where exactly do I need to call PerformAction(ExitEditMode)
It sounds like you are using the Before/AfterCellUpdate events. These events only fire when the data is committed to the grid's underlying data source.
If you want to trap when a cell changes immediately, you should use the CellChange event. Note that you must use the Text property of the cell inside this event. You can't use Value, because Value doesn't get updated until you leave the cell.