WinUI

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

    Show / Hide Table of Contents

    Class GridAddNewRowController

    Represents a class that implements AddNewRow operations in SfDataGrid .

    Inheritance
    System.Object
    GridAddNewRowController
    Implements
    System.IDisposable
    Namespace: Syncfusion.UI.Xaml.DataGrid
    Assembly: Syncfusion.Grid.WinUI.dll
    Syntax
    public class GridAddNewRowController : Object, IDisposable

    Constructors

    GridAddNewRowController(SfDataGrid)

    Initializes a new instance of GridAddNewRowController class.

    The SfDataGrid.
    Declaration
    public GridAddNewRowController(SfDataGrid grid)
    Parameters
    Type Name Description
    SfDataGrid grid

    Methods

    AddNew()

    Invoked when the new item is initiated to add into source collection.

    Declaration
    public virtual bool AddNew()
    Returns
    Type Description
    System.Boolean

    Returns true if the new item has initiated in AddNewRow; otherwise false.

    Remarks

    AddNew invoked when the cell in AddNewRow goes edit mode .

    CancelAddNew()

    Invoked when the new item is canceled before adding it to source collection.

    Declaration
    public virtual void CancelAddNew()
    Remarks

    CancelAddNew invoked when Esc key is pressed twice in AddNewRow.

    CommitAddNew(Boolean)

    Commits the new item into the source collection.

    Declaration
    public virtual void CommitAddNew(bool changeState = true)
    Parameters
    Type Name Description
    System.Boolean changeState

    Indicates whether the AddNewRow changed to normal state.

    Dispose()

    Release all the resources used by the GridAddNewRowController class.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Disposes all the resources used by the GridAddNewRowController class.

    Indicates whether the call is from Dispose method or from a finalizer.
    Declaration
    protected virtual void Dispose(bool isDisposing)
    Parameters
    Type Name Description
    System.Boolean isDisposing

    GetAddNewRowIndex()

    Gets the row index of the AddNewRow.

    Declaration
    public int GetAddNewRowIndex()
    Returns
    Type Description
    System.Int32

    Returns row index of the AddNewRow.

    Implements

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