alexa
menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class LostFocusBehavior

    Defines the constants that specify the behavior of the DataGrid when it loses focus.

    Inheritance
    System.Object
    LostFocusBehavior
    Namespace: Syncfusion.UI.Xaml.Grids
    Assembly: Syncfusion.Grid.WinUI.dll
    Syntax
    public sealed class LostFocusBehavior : Enum
    Remarks

    This enumeration is used by the LostFocusBehavior property to control whether the editing of the current cell is committed when focus moves from the SfDataGrid to another control. The default value is EndEditCurrentCell.

    Fields

    Default

    Specifies that the editing of current cell should not be ended when the DataGrid loses focus.

    Declaration
    public const LostFocusBehavior Default
    Field Value
    Type
    LostFocusBehavior
    Remarks

    The current cell remains in edit mode when the SfDataGrid loses focus. The edit session stays active until the user explicitly commits or cancels the edit by interacting with the current cell.

    EndEditCurrentCell

    Specifies that the editing of current cell should be ended when the DataGrid loses focus.

    Declaration
    public const LostFocusBehavior EndEditCurrentCell
    Field Value
    Type
    LostFocusBehavior
    Remarks

    When the SfDataGrid loses focus, the editing of the current cell is committed and the CurrentCellEndEdit event is raised. Validation can be handled through the CurrentCellValidating event before the edit is committed.

    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved