Class GridAddNewRowController
Represents a class that implements AddNewRow operations in SfDataGrid .
Inheritance
Implements
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. |