Class CurrentCellManager
Represents a class that manages the current cell operation in SfDataGrid.
Inheritance
Inherited Members
Namespace: Syncfusion.WinForms.DataGrid.Interactivity
Assembly: Syncfusion.SfDataGrid.WinForms.dll
Syntax
public class CurrentCellManager
Constructors
CurrentCellManager(SfDataGrid)
Initializes a new instance of the CurrentCellManager class.
Declaration
public CurrentCellManager(SfDataGrid dataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The dataGrid. |
Properties
CellRenderer
Gets the cell renderer of the current cell.
Declaration
public GridCellRendererBase CellRenderer { get; }
Property Value
Type |
---|
GridCellRendererBase |
Column
Gets the current cell column of SFDataGrid.
Declaration
public GridColumn Column { get; }
Property Value
Type |
---|
GridColumn |
ColumnIndex
Gets the current cell column index of SFDataGrid.
Declaration
public int ColumnIndex { get; }
Property Value
Type |
---|
System.Int32 |
DataGrid
Gets or sets the reference to the DataGrid control.
Declaration
protected SfDataGrid DataGrid { get; set; }
Property Value
Type | Description |
---|---|
SfDataGrid | The reference to the DataGrid control. |
IsEditing
Gets a value indicating whether the current cell is in editing or not.
Declaration
public bool IsEditing { get; }
Property Value
Type |
---|
System.Boolean |
RowIndex
Gets the current cell row index of SFDataGrid.
Declaration
public int RowIndex { get; }
Property Value
Type |
---|
System.Int32 |
Methods
AllowFocus(RowColumnIndex)
Determines whether the focus is allowed for the specified rowcolumnindex .
Declaration
protected bool AllowFocus(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | The corresponding rowColumnIndex. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the focus is allowed for the specified rowcolumnindex; otherwise, false. |
BeginEdit()
Begins the editing of the current cell.
Declaration
public void BeginEdit()
CancelEdit()
Cancels the editing and discards the changes of the current cell .
Declaration
public void CancelEdit()
DetailsViewScrollInView(RowColumnIndex)
Scrolls the DetailsView DataGrid vertically and horizontally to display a cell for the specified RowColumnIndex.
Declaration
protected void DetailsViewScrollInView(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Specifies the rowColumnIndex of the cell to bring into view. |
EndEdit(Boolean)
Ends the editing of the current cell.
Declaration
public bool EndEdit(bool canCommit = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | canCommit | Specifies whether the view can be commit or not. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the result of the end editing of the current cell. |
HandleKeyDown(KeyEventArgs)
Handle the KeyDown event for the current cell.
Declaration
protected bool HandleKeyDown(KeyEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | args | An System.Windows.Forms.KeyEventArgs that contains event data. |
Returns
Type | Description |
---|---|
System.Boolean | Returns false if the current cell handled the key down; otherwise returns true. |
RaiseCurrentCellActivatedEvent(RowColumnIndex)
Raising the current cell activated event.
Declaration
protected void RaiseCurrentCellActivatedEvent(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Row column index for raising the event. |
RaiseCurrentCellActivatingEvent(RowColumnIndex)
Raising the current cell activating event.
Declaration
protected bool RaiseCurrentCellActivatingEvent(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Row column index for raising the event. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the current cell is set; otherwise false. |
ScrollInView(RowColumnIndex)
Scrolls the SfDataGrid vertically and horizontally to display a cell for the specified RowColumnIndex.
Declaration
protected void ScrollInView(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Specifies the rowColumnIndex of the cell to bring into view. |
ScrollToRowIndex(Int32)
Scrolls the row in to view at the specified row index.
Declaration
protected void ScrollToRowIndex(int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The zero-based row index to scroll the row into view. |
UpdateCurrentRowIndex(Int32, Int32)
Updates the current row index based on
Declaration
protected void UpdateCurrentRowIndex(int rowIndex, int columnIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The corresponding row index for update the current cell. |
System.Int32 | columnIndex | The corresponding column index for update the current cell. |