HiI have a ultrawingrid consisting of two binded checkbox columns only. I want to make those columns mutually exlusive so if i check one the other have to be unchecked. To achieve that i am using AfterCellUpdate event to update the binded object, this is working fine except that this event does not fire until the user leave the cell and i want to perform the update the object and refresh the control after the user had checked or unchecked any checkbox.Question i short, can the object be updated and the grid row refreshed just after the user check\uncheck each cell?
Thanks
Hello Elio,
You are on the right way. What you have to change is the event you are using. To achieve immediate update of the other checkbox you need to use CellChange event.
Please find attached a sample solution and let me know if this is what you are looking for or if I am missing something.
Thanks very much sr, CellChange was the correct event to handle.
Just one thing, to actually refresh the cells and reflect the object values immediately after checkor unchek, i have to call e.Cell.Row.Update():
Private Sub ProcessCollectionUltraGrid_CellChange(sender As System.Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles ProcessCollectionUltraGrid.CellChange e.Cell.Row.Update()'prevent the same event to fire while updating the binded object in code ProcessCollectionUltraGrid.EventManager.SetEnabled(Infragistics.Win.UltraWinGrid.GridEventIds.CellChange, False) _rolePermissionsPresenter.UpdateRolePermission(e.Cell) ProcessCollectionUltraGrid.EventManager.SetEnabled(Infragistics.Win.UltraWinGrid.GridEventIds.CellChange, True)
End Sub