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

GridGroupingCotrnol - TableControlCurrentCellControlLostFocus

Thread ID:





47848 Aug 14,2006 03:31 PM UTC Aug 17,2006 09:26 AM UTC WinForms 3
Tags: GridControl
Clive Hill
Asked On August 14, 2006 03:31 PM UTC


When editing a cell I want to update that cell''s Text (its a TextBox cell) to the old value. It then gets updated once the server has been updated, and propogates its changes back to the client.

I use TableControlCurrentCellStartEditing to capture the old value, and TableControlCurrentCellEditingComplete to set the control text back to old value like:

gcrb.ControlText = oldValueArgs.ToString();

where gcrb is

This works fine if the user hits Enter on the keyboard but if they tab, use arrow keys, or click with mouse elsewhere, the value is not changed back to the old value. Also, for arrow and tab, the icon on the LHS of grid remains as editing (icon of a writing pencil).

I tried using TableControlCurrentCellControlLostFocus to update the cell''s control text, but this has no impact. Again, I use gcrb.ControlText, and I can see that its value is updated in the code, but not in the grid.

Any suggestions?

Administrator [Syncfusion]
Replied On August 16, 2006 12:15 AM UTC

So, you want to let your user type into a cell, but when he leaves it, you catch the new value and reset the cell to its old value? If so, I think you can do this by handling a single event, TableControlCurrentCellAcceptedChanges. Here is a little sample.


Clive Hill
Replied On August 16, 2006 05:47 PM UTC

Hi Clay,

I noticed that if you edit the cell once, and hit return, the cell goes back to previous value. If you then update the cell again without moving from cell first, the value updates on the grid, i.e. doesn''t revert back to original value.

1 -> 2 -> 1
Then without moving.
1 -> 3 stays as 3.

This occurs on your example project to. I assume this is because the cell gets marked as ahving rejected the change once, so next time doesn''t. Is there a way to reject and then have cell as initial state?

Clive Hill
Replied On August 17, 2006 09:26 AM UTC

I found calling:


after cc.RejectChanges() fixes this problem.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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