We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Lost focus of cell

Thread ID:

Created:

Updated:

Platform:

Replies:

16701 Jul 22,2004 07:34 AM UTC Jul 22,2004 08:29 AM UTC WinForms 2
loading
Tags: GridControl
Kewalramani Kanchan
Asked On July 22, 2004 07:34 AM UTC

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. Example : 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.

Administrator [Syncfusion]
Replied On July 22, 2004 07:48 AM UTC

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. ForumSampleFocus_3764.zip 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 grid.CurrentCell.EndEdit(); grid.Binder.EndEdit(); 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.

Kewalramani Kanchan
Replied On July 22, 2004 08:29 AM UTC

Thanks Clay......we were able to acheive the same using the grid.Leave event.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;