After editing data on a cell, if the user moves to a different control on the form say a button, the newly entered data is not accepted by the grid.
Enter a value “123” in cell1 of DataBoundgrid -->>If the user moves out by using the mouse and clicking on a button on the grid then the cell has the original value and not “123”.
However, if we enter a value “123” in cell1 of DataBoundgrid and moves out by using the tab/arrow/Enter key the cell retains the value as “123”.
Could you suggest a solution to force the lost focus of the cell. We have tried to use MoveTo() method on the button click before performing the action but that doesnot work.
ADAdministrator Syncfusion Team July 22, 2004 03:48 AM
This is not standard behavior. For example, I do not see it in this sample that has a GridDataBoundGrid and a Button on a form.
So, to get things to work, you may have to identify what is interfering with the default behavior.
The normal things you can do to force the grid to save values would be to call
But this may not be sufficient if there is something interfering with the saving process. You might try listening to the grid.Leave event and see if that is being hit in this case. If so, you could try doing the two calls above to see if that handles things.
You might look through your code for calls to CancelEdit as that would be something that would throw away changes and restore the old value.
KKKewalramani Kanchan July 22, 2004 04:29 AM
Thanks Clay......we were able to acheive the same using the grid.Leave event.