Class GridCurrentCell
Represents a class which maintains the information about the current cell of SfCellGrid.
Implements
Namespace: Syncfusion.UI.Xaml.CellGrid
Assembly: Syncfusion.SfCellGrid.UWP.dll
Syntax
public class GridCurrentCell : Object, IDisposable
Constructors
GridCurrentCell(SfCellGrid)
Initializes a new instance of the GridCurrentCell class.
Declaration
public GridCurrentCell(SfCellGrid grid)
Parameters
Type | Name | Description |
---|---|---|
SfCellGrid | grid | An instance of SfCellGrid. |
Fields
isEditing
Declaration
protected bool isEditing
Field Value
Type |
---|
System.Boolean |
Properties
CellRowColumnIndex
Gets the instance of RowColumnIndex of CurrentCell.
Declaration
public RowColumnIndex CellRowColumnIndex { get; }
Property Value
Type | Description |
---|---|
RowColumnIndex | An instance of RowColumnIndex. |
ColumnIndex
Gets the column index of CurrentCell.
Declaration
public int ColumnIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 | Column index. |
HasCurrentCell
Gets the value indicating whether the Grid has CurrentCell or not.
Declaration
public bool HasCurrentCell { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True or False. |
HasCurrentCellState
Returns the current cell state of renderer
Declaration
protected virtual bool HasCurrentCellState { get; }
Property Value
Type |
---|
System.Boolean |
HasDataValidationTooltip
Returns true, If datavalidation tooltip has been set to current cell.
Declaration
protected virtual bool HasDataValidationTooltip { get; }
Property Value
Type |
---|
System.Boolean |
IsEditing
Gets or sets whether the current cell is in editing mode or not.
Declaration
public bool IsEditing { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True or False. |
IsModified
Gets the value indicating whether the current cell value is modified on editing or not.
Declaration
public bool IsModified { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True or False. |
PreviousRowColumnIndex
Gets or sets the RowColumnIndex of old CurrentCell
Declaration
public RowColumnIndex PreviousRowColumnIndex { get; set; }
Property Value
Type |
---|
RowColumnIndex |
Range
Gets the current cell range in SfCellGrid.
Declaration
public GridRangeInfo Range { get; }
Property Value
Type | Description |
---|---|
GridRangeInfo | Current cell range. |
RowIndex
Gets the row index of CurrentCell.
Declaration
public int RowIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 | Row index. |
Style
Returns the GridStyleInfo of CurrentCell.
Declaration
public GridStyleInfo Style { get; }
Property Value
Type |
---|
GridStyleInfo |
Methods
BeginEdit(Boolean)
Begins the editing operation of CurrentCell.
Declaration
public virtual bool BeginEdit(bool forceEdit = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | forceEdit | Set this true to avoid triggering events. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true, if current cell enters into edit mode. |
CanMove(RowColumnIndex)
Determines whether to move the focus to next cell or not.
Declaration
protected virtual bool CanMove(RowColumnIndex rowCol)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowCol | Coordinates of the cell. |
Returns
Type | Description |
---|---|
System.Boolean | True or False. |
CharacterReceived(CharacterReceivedEventArgs)
Invoked when the current cell gets input text.
Declaration
protected virtual void CharacterReceived(CharacterReceivedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Core.CharacterReceivedEventArgs | args |
Dispose()
Call the Dispose and SuppressFinalize method for dipose the instance of GridCurrentCell class.
Declaration
public void Dispose()
Dispose(Boolean)
Dispose the live resources used by the GridCurrentCell class.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Dispose the instance, if it is True |
EndEdit(Boolean)
Commit and end the editing operation of CurrentCell
Declaration
public virtual void EndEdit(bool canCommit = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | canCommit | If true, commit the new changes; otherwise revert to old value. |
GetControlValue()
Used to get the control value from renderer.
Declaration
protected virtual object GetControlValue()
Returns
Type | Description |
---|---|
System.Object | Value of the current cell. |
MoveCurrentCell(RowColumnIndex, Boolean)
Move the CurrentCell to mentioned row and column index.
Declaration
public bool MoveCurrentCell(RowColumnIndex rowColIndex, bool forceMove = false)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColIndex | RowColumnIndex. |
System.Boolean | forceMove | If true, then suspend all currentcell events while moving. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true, if CurrentCell is moved. |
MoveCurrentCell(Int32, Int32)
Move the CurrentCell to mentioned row and column index.
Declaration
public bool MoveCurrentCell(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | Row index. |
System.Int32 | colIndex | Column index. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true, if CurrentCell is moved. |
RaiseCurrentCellBeginEditEvent(RowColumnIndex)
Invokes the CurrentCellBeginEdit event.
Declaration
protected bool RaiseCurrentCellBeginEditEvent(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | An instance of RowColumnIndex. |
Returns
Type | Description |
---|---|
System.Boolean | True or False. |
RaiseCurrentCellEndEditEvent(RowColumnIndex)
Invokes the CurrentCellEndEdit event.
Declaration
protected void RaiseCurrentCellEndEditEvent(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | An instance of RowColumnIndex. |
Refresh()
Refreshes the Current Range.
Declaration
public void Refresh()
RemoveCurrentCell()
Remove the CurrentCell.
Declaration
public void RemoveCurrentCell()
ResetCurrentCellState()
Used to reset the current cell state of the renderer.
Declaration
protected virtual void ResetCurrentCellState()
SetControlValue(Object)
Used to set the control value to renderer.
Declaration
protected virtual void SetControlValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | Control value. |
SetCurrentCellState()
Used to set the CurrentCellState of the Renderer.
Declaration
protected virtual void SetCurrentCellState()
SetFocus(Boolean)
Used to set the focus using renderer.
Declaration
protected virtual void SetFocus(bool needToFocus)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | needToFocus | If true, set focus to edit element |
ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs)
Determines whether renderer handles key down or not.
Declaration
protected virtual bool ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.KeyRoutedEventArgs | args |
Returns
Type |
---|
System.Boolean |
Validate(out Boolean)
Validate the CurrentCell in SfCellGrid.
Declaration
public bool Validate(out bool isValid)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isValid |
Returns
Type | Description |
---|---|
System.Boolean | True or False. |
ValidateAndEndEdit()
Validate and then finish the editing 1.If Cancel=True and IsValid=False then currentcell remains in edit mode. 2.If Cancel=True and IsValid=True then canceledit and currentcell remains in edit mode. 3.If Cancel=False and IsValid=False then canceledit and currentcell moved to next cell. 4.If Cancel=False and IsValid=True then endedit and currentcell moved to next cell.(Default)
Declaration
public bool ValidateAndEndEdit()
Returns
Type | Description |
---|---|
System.Boolean | Returns true, if successfully finish the editing |