Hi,
I have an UltraCombo that is used to select items from a list and set a cell value back in the grid. The grid is bound to a List<MyBusinessObject> data source.
However, the cell is not updated until the user navigates off it where AfterCellUpdate. I want to update the cell/data source immediately at the point the user has selected a value.
What is the best way to do this?
Thanks,
Andez
Hi Mike,
I was perhaps not clear.
What I want is to update the underlying row object (ListObject) associated with the grid row when the user selects an item from the UltraCombo. The combo is associated with a grid column in the UltraGrid and provides the user a choice for that column. So assuming my List<BusinessObject> is infact List<Person> which has a property of FavColor of type Color, the list is bound to a List<Color> for examples sake.
So when the user clicks on the Color column cell on a row, the UltraCombo editor will appear and they click on the drop down arrow and select a Color from the list of Colors. At this point the drop down portion of the UltraCombo is closed, but the selected value appears in the UltraCombo in the cell. When the user navigates from the UltraCombo cell, the underlying data source (row's ListObject) is updated from what you are saying. This is all controlled by the UltraGrid I am guessing?
However, I don't want to update the underlying ListObject at this point. I want to update the row's ListObject (Person.FavColor) when the selection is made in the UltraCombo - ie when the user clicks an item.
Can this be done?
Many thanks,
Hi Andez,
There's no way to commit a single cell to the data source you can only do this for the entire row.
To commit the row, you call the Update method on the row. You can also use grid.UpdateData to commit all pending changes in all rows.