Syncfusion.Grid.Windows
Example 


GetEditState Method (GridCellRendererBase)

Returns state information that lets you restore the current editing state (e.g. caret position or other cell-type specific information) at a later point with SetEditState.
Syntax
'Declaration
 
Public Overridable Function GetEditState() As Object
'Usage
 
Dim instance As GridCellRendererBase
Dim value As Object
 
value = instance.GetEditState()
public virtual object GetEditState()

Return Value

A cell-type specific object with editing state information.
Remarks
You need to override this method in a derived cell-type class. Otherwise calling this method will have no effect.
Example
This example shows how to get the edit state of the cell.
//Scroll position based on the column index.
public override object GetEditState()
{
    if (this.gridControl1.CurrentCell.IsEditing)
    {
        return new int[] { 0, this.gridControl1[this.gridControl1.CurrentCell.RowIndex,this.gridControl1.CurrentCell.ColIndex].Text.Length };
    }
    return null;
}
Public Overrides Function GetEditState() As Object
    If Me.gridControl1.CurrentCell.IsEditing Then
        Return New Integer(){ 0, Me.gridControl1(Me.gridControl1.CurrentCell.RowIndex, Me.gridControl1.CurrentCell.ColIndex).Text.Length }
    End If
    Return Nothing
End Function
AssemblyVersion

Syncfusion.Grid.Windows: 18.2460.0.44

See Also