Home Forums WinForms controls Xceed Grid for WinForms about original/new value

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #17228 |


    I’m facing a problem:

    There are 10 datarows  in the grid

       ‘A’     ‘B’    ‘C’

       ‘D’     ‘E’    ‘F’

    …..     ….     ….

     I changed   ‘B’—>’Y’   ‘E’—>’Z’ then how can i  get  the orginial data(‘B’  AND ‘E’) ?

    Note: At first I use  “canceledit” to get the orgininal,but if move to next row  then the orgininal = new value!!

    i don’t want once modify get a original value. I want to get the original value after all modification has finished.


    Imported from legacy forums. Posted by REX (had 1083 views)

    User (Old forums)
    Post count: 23064


    For your information, CancelEdit() can only “Cancel” restore what was copied by BeginEdit().  In other words, if BeginEdit() was not initially called, CancelEdit() can not have any effect on this row.

    The LeavingEdit event is perhaps what you should be looking for.  As the documentation says:

    The LeavingEdit event is raised after a cell has been edited. It provides information on the cell that has been edited and provides the opportunity to prevent the cell editor from being removed, leaving the cell in edit mode, or to change the new value that is about to be assigned to the cell. 

    Keep in mind that the LeavingEdit event will not be raised if the LeaveEdit method is called with its commit parameter set to false.

    For more informations regarding how to use the LeavingEdit event, you can read this section:


    or access through Start menu by clicking “Start -> Programs -> Xceed Components -> .NET Components -> Windows Forms -> Grid for .NET 3.8 -> Documentation” and then going to “Task-Based Help -> Events -> How to you the LeavingEdit event”. 

    You will find the a sample application (C# et VB.NET).


    Imported from legacy forums. Posted by Ghislain (had 946 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.