Hello team,
I have a UltraGrid which is bound to a List of custom class as below.
ultraGridExposureData.DataSource = expDataModelList; ultraGridExposureData.DataBind();
I have a Button called UpdateData on the form and when the user hits on this button the updated data will be moved to database. This part is working fine.
The only issue I am facing is when the user changes the value in a cell and is still in edit mode and hits the UpdateData button, I am not getting the new value of the cell. Is there any way for me to get the new value while the cell is still in edit mode?
Below is snapshot image of the grid, I was trying to change the 2nd cell value of UserModified column from Admin to Baba. At this point, I did not move my cursor to another row or cell and then hit UpdateButton to update database
.
I have tried changing the UpdateMode of the grid to OnCellChange and OnUpdate, it did not work.
Hello Baba,
Thank you for contacting Infragistics!
Before you update the grid you will want to call PerformAction ExitEditMode. You can see an example here.
Thank you Mike.
It did work. One more question I have, how do I cancel my changes/updates done on the grid?
Thank you for the update. You should be able to call the perform action Undo, UndoCell, or UndoRow depending upon your requirements. I recommend reading them to see which fits you need.