Xceed Grid for WinForms v4.3 Documentation
Xceed.Grid.v4.3 Assembly / Xceed.Grid Namespace / Cell Class / LeavingEdit Event


In This Topic
    LeavingEdit Event
    In This Topic
    Raised after a cell has been edited to validate the content of the cell.
    Syntax
    'Declaration
     
    <DescriptionAttribute("Raised after a cell has been edited to validate the content of the cell.")>
    <CategoryAttribute("Data")>
    Public Event LeavingEdit As LeavingEditEventHandler
    'Usage
     
    Dim instance As Cell
    Dim handler As LeavingEditEventHandler
     
    AddHandler instance.LeavingEdit, handler
    [Description("Raised after a cell has been edited to validate the content of the cell.")]
    [Category("Data")]
    public event LeavingEditEventHandler LeavingEdit
    Event Data

    The event handler receives an argument of type LeavingEditEventArgs containing data related to this event. The following LeavingEditEventArgs properties provide information specific to this event.

    PropertyDescription
    (Inherited from System.ComponentModel.CancelEventArgs)
    Gets the control that is currently editing the content of the cell.  
    Gets or sets the new value assigned to the Value property of the cell.  
    Remarks

    Custom validation can be provided in the LeavingEdit event. In this event, if the validation process fails, setting e.Cancel to true will cause the ValidationError event to be raised.

    Setting e.CancelEdit to false in the ValidationError event will prevent the cell from leaving edit mode in the case where the its value fails the validation process.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also