Class DataGridCurrentCellManager
Represents the class that manages the current cell operation in SfDataGrid.
Inheritance
Implements
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public class DataGridCurrentCellManager : Object, IDisposable
Constructors
DataGridCurrentCellManager(SfDataGrid)
Initializes a new instance of the DataGridCurrentCellManager class.
Declaration
public DataGridCurrentCellManager(SfDataGrid grid)
Parameters
| Type | Name | Description |
|---|---|---|
| SfDataGrid | grid | An instance of SfDataGrid class. |
Properties
DataColumn
Gets or sets the currently active cell.
Declaration
public DataColumnBase DataColumn { get; set; }
Property Value
| Type | Description |
|---|---|
| Syncfusion.Maui.DataGrid.DataColumnBase | The Syncfusion.Maui.DataGrid.DataColumnBase that represents the current cell. Returns null if there is no currently active cell. |
RowColumnIndex
Gets or sets the RowColumnIndex that indicates the position of the current cell.
Declaration
public RowColumnIndex RowColumnIndex { get; set; }
Property Value
| Type |
|---|
| RowColumnIndex |
Methods
Dispose()
Disposes all the resources used by the
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the VisualContainer class.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | Indicates whether the call is from Dispose method or from a finalize method. |
GetNextRowIndex(Int32, Int32, Boolean)
Calculates the next valid row index for navigation within the data grid, taking into account covered cell ranges and scrolling behavior.
Declaration
protected int GetNextRowIndex(int rowIndex, int columnIndex, bool scrolling = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | rowIndex | The current row index from which to determine the next navigable row. |
| System.Int32 | columnIndex | The column index associated with the current cell. Used to identify covered cell ranges. |
| System.Boolean | scrolling | true to adjust navigation for scrolling scenarios; otherwise, false. Defaults to false. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The next row index to navigate to, considering covered cell ranges and grid boundaries. Returns the original row index if no navigation is possible. |
Remarks
This method accounts for covered (merged) cell ranges in the data grid. When navigating, it ensures that navigation does not enter or skip covered ranges inappropriately. If the specified cell is within a covered range, the method returns the appropriate row index based on the navigation context and grid limits.
ProcessCurrentCellSelection(RowColumnIndex)
Processes the selection for current cell corresponding to its RowColumnIndex.
Declaration
protected virtual void ProcessCurrentCellSelection(RowColumnIndex newRowColumnIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| RowColumnIndex | newRowColumnIndex | The corresponding RowColumnIndex to process the current cell selection. |
ProcessCurrentRowSelection(RowColumnIndex)
Declaration
protected virtual void ProcessCurrentRowSelection(RowColumnIndex newRowColumnIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| RowColumnIndex | newRowColumnIndex |
RaiseValidationAndEndEdit(Boolean)
Declaration
protected bool RaiseValidationAndEndEdit(bool canCommit = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | canCommit |
Returns
| Type |
|---|
| System.Boolean |