alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class GridEditSettings

    Configures grid edit settings.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    SfDataBoundComponent
    GridEditSettings
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(bool)
    SfBaseComponent.LicenseContext
    SfBaseComponent.OnObservableChange(string, object, bool, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicenseByUICategory()
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfDataBoundComponent.OnAfterRenderAsync(bool)
    SfDataBoundComponent.SetDataManager<T>(object)
    Namespace: Syncfusion.Blazor.Grids
    Assembly: Syncfusion.Blazor.Grids.dll
    Syntax
    public class GridEditSettings : SfDataBoundComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    GridEditSettings()

    Declaration
    public GridEditSettings()

    Properties

    AllowAdding

    If AllowAdding is set to true, new records can be added to the Grid.

    Declaration
    [Parameter]
    public bool AllowAdding { get; set; }
    Property Value
    Type
    bool

    AllowDeleting

    If AllowDeleting is set to true, existing record can be deleted from the Grid.

    Declaration
    [Parameter]
    public bool AllowDeleting { get; set; }
    Property Value
    Type
    bool

    AllowEditOnDblClick

    If AllowEditOnDblClick is set to false, Grid will not allow editing of a record on double click.

    Declaration
    [Parameter]
    public bool AllowEditOnDblClick { get; set; }
    Property Value
    Type
    bool

    AllowEditOnKeyPress

    Gets or sets a value indicating whether a focused cell enters edit mode when a printable key is pressed.

    Declaration
    [Parameter]
    public bool AllowEditOnKeyPress { get; set; }
    Property Value
    Type Description
    bool

    A bool value that determines whether typing directly into a focused cell automatically starts editing. The default value is false.

    Remarks

    When set to true, pressing a printable character key, such as a letter, digit, or symbol, immediately places the focused cell into edit mode. The editor is opened with its current content cleared and the typed character becomes the initial value. Pressing the Enter key behaves differently. It opens the editor for the current cell while retaining and selecting the existing value. This property is applicable only when Mode is set to Cell and has no effect in other edit modes.

    Examples
    <SfGrid DataSource="@Orders">
        <GridEditSettings AllowEditing="true"
                          Mode="EditMode.Cell"
                          AllowEditOnKeyPress="true" />
    </SfGrid>

    AllowEditOnSingleClick

    Specifies whether a cell enters edit mode on a single mouse click.

    Declaration
    [Parameter]
    public bool AllowEditOnSingleClick { get; set; }
    Property Value
    Type Description
    bool

    true to enable single-click editing; otherwise, false. The default value is false.

    Remarks

    When enabled, a cell enters edit mode on a single click. Otherwise, double-click is required. This property is applicable only when Mode is set to Batch. It has no effect in other editing modes.

    AllowEditing

    If AllowEditing is set to true, values can be updated in the existing record.

    Declaration
    [Parameter]
    public bool AllowEditing { get; set; }
    Property Value
    Type
    bool

    AllowNextRowEdit

    If allowNextRowEdit is set to true, editing is done to next row. By default allowNextRowEdit is set to false.

    Declaration
    [Parameter]
    public bool AllowNextRowEdit { get; set; }
    Property Value
    Type
    bool

    Dialog

    Defines the dialog params to edit.

    Declaration
    [Parameter]
    public DialogSettings? Dialog { get; set; }
    Property Value
    Type
    DialogSettings

    EnableUndoRedo

    Gets or sets a value indicating whether the Undo/Redo functionality is enabled for batch editing operations.

    Declaration
    [Parameter]
    public bool EnableUndoRedo { get; set; }
    Property Value
    Type Description
    bool

    true if Undo/Redo is enabled for batch editing; otherwise, false. The default value is false.

    Remarks

    This property is only effective when the Mode property is set to Batch. When enabled, the grid records batch edit actions (such as cell edits, row additions, row deletions, paste, and auto-fill operations) into an undo/redo history that can be navigated using UndoAsync(), RedoAsync(), and related APIs.

    EnterKeyDirection

    Gets or sets the navigation behavior of the Enter key while editing cells.

    Declaration
    [Parameter]
    public EnterKeyDirection EnterKeyDirection { get; set; }
    Property Value
    Type Description
    EnterKeyDirection

    An EnterKeyDirection value that specifies how focus moves after a cell value is committed. The default value is None.

    Remarks

    This property is applicable only when Mode is set to Cell. When enabled, pressing the Enter key saves the current cell value and optionally moves focus according to the configured direction. For edit modes other than Cell, the Enter key follows the default behavior associated with that mode.

    Examples
    <SfGrid DataSource="@Orders">
        <GridEditSettings AllowEditing="true"
                          Mode="EditMode.Cell"
                          EnterKeyDirection="EnterKeyDirection.NextColumn" />
    </SfGrid>

    FooterTemplate

    Defines the custom footer for the edit dialog.

    Declaration
    [Parameter]
    public RenderFragment<object>? FooterTemplate { get; set; }
    Property Value
    Type
    RenderFragment<object>
    Remarks

    The parameters passed to the templates can be accessed using implicit parameter named context. The context is of type TValue of the grid.

    HeaderTemplate

    Defines the custom header for the edit dialog.

    Declaration
    [Parameter]
    public RenderFragment<object>? HeaderTemplate { get; set; }
    Property Value
    Type
    RenderFragment<object>
    Remarks

    The parameters passed to the templates can be accessed using implicit parameter named context. The context is of type TValue of the grid.

    Mode

    Defines the mode to edit. The available editing modes are:

    • NormalDefault. Editing is done in an inline form. Edit form is rendered inline as one of the table rows.
    • DialogEditing is done in a Dialog/Pop component.
    • BatchEnables cell editing. Multiple cells can be edited, added or deleted and saved.
    Declaration
    [Parameter]
    public EditMode Mode { get; set; }
    Property Value
    Type
    EditMode

    NewRowPosition

    Defines the position of adding a new row. The available position are:

    • TopDefault. Add form is placed at the first row of the grid.
    • BottomAdd form is placed at the last row of the grid
    Declaration
    [Parameter]
    public NewRowPosition NewRowPosition { get; set; }
    Property Value
    Type
    NewRowPosition

    ShowAddNewRow

    Gets or sets a value indicating whether to display a new blank row during grid initialization, facilitating the addition of new records.

    Declaration
    [Parameter]
    public bool ShowAddNewRow { get; set; }
    Property Value
    Type Description
    bool

    true, a new blank row is displayed on the grid content. The default value is false.

    Remarks

    By default, the new blank row is displayed at the top of the grid content. A new blank row can be displayed either at the top or bottom of the corresponding page, depending on the setting of the NewRowPosition property. However, it's important to note that the ShowAddNewRow property solely pertains to the display of a new blank row in the Normal editing mode. If the AllowAdding property is set to false, the new blank row will be disabled. Additionally, if any of the grid column's AllowAdding properties is set to false, the corresponding column cell will also be disabled.

    ShowConfirmDialog

    If ShowConfirmDialog is set to false, confirm dialog does not show when batch changes are saved or discarded.

    Declaration
    [Parameter]
    public bool ShowConfirmDialog { get; set; }
    Property Value
    Type
    bool

    ShowDeleteConfirmDialog

    If ShowDeleteConfirmDialog is set to true, confirm dialog will show delete action. You can also cancel delete command.

    Declaration
    [Parameter]
    public bool ShowDeleteConfirmDialog { get; set; }
    Property Value
    Type
    bool

    Template

    Defines the custom content and edit elements for the edit dialog.

    Declaration
    [Parameter]
    public RenderFragment<object>? Template { get; set; }
    Property Value
    Type
    RenderFragment<object>
    Remarks

    The parameters passed to the templates can be accessed using implicit parameter named context. The context is of type TValue of the grid.

    UndoRedoLimit

    Gets or sets the maximum number of Undo/Redo steps to maintain in memory.

    Declaration
    [Parameter]
    public int UndoRedoLimit { get; set; }
    Property Value
    Type Description
    int

    The maximum number of actions to keep in the Undo/Redo history. The default value is 20.

    Remarks

    When the number of recorded actions exceeds this limit, the oldest action is discarded to make room for new ones. The minimum value applied is 1; any value less than 1 is treated as 1. The clamp is silent; no diagnostic is emitted when it engages.

    The limit counts actions, not individual cells. A single Paste or AutoFill action buffers every affected cell in its PreviousValues list, so one action can hold thousands of CellChange<T> entries. Memory usage therefore scales with UndoRedoLimit × max cells per Paste/AutoFill; size the buffer accordingly for large row counts.

    This property is only effective when EnableUndoRedo is set to true and the Mode is Batch.

    Validator

    Defines the custom validator component for the built-in EditForm. Use this to override built-in validation components.

    Declaration
    [Parameter]
    public RenderFragment<object>? Validator { get; set; }
    Property Value
    Type
    RenderFragment<object>
    Remarks

    The parameters passed to the templates can be accessed using implicit parameter named context. The context is of type ValidatorTemplateContext.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    OnInitializedAsync()

    Initializes the GridEditSettings, applies edit configuration, and updates the parent grid.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    Task
    Overrides
    SfDataBoundComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Handles parameter updates for GridEditSettings and synchronizes internal state when values change.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type
    Task
    Overrides
    SfDataBoundComponent.OnParametersSetAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved