Class SelectionHelper
Helper class which is used to get the mouse pointer position, visible row/column index and handles the key operations.
Inheritance
Namespace: Syncfusion.UI.Xaml.CellGrid
Assembly: Syncfusion.SfCellGrid.UWP.dll
Syntax
public static class SelectionHelper : Object
Methods
CheckAltKeyPressed()
Check whether the Alt key is pressed or not.
Declaration
public static bool CheckAltKeyPressed()
Returns
Type | Description |
---|---|
System.Boolean | True if the key is pressed; otherwise false. |
CheckControlKeyPressed()
Check whether the Control key is pressed.
Declaration
public static bool CheckControlKeyPressed()
Returns
Type | Description |
---|---|
System.Boolean | True if the key is pressed;otherwise false. |
CheckShiftKeyPressed()
Check whether the Shift key is pressed
Declaration
public static bool CheckShiftKeyPressed()
Returns
Type | Description |
---|---|
System.Boolean | True if the key is pressed;otherwise false. |
GetFirstVisibleColumnIndex(SfCellGrid)
Helper method for find the first visible column index in view.
Declaration
public static int GetFirstVisibleColumnIndex(this SfCellGrid grid)
Parameters
Type | Name | Description |
---|---|---|
SfCellGrid | grid | An instance of SfCellGrid. |
Returns
Type | Description |
---|---|
System.Int32 | return the first column index when grid have visible columns lines more than header column else returns headercolumns. |
GetFirstVisibleRowIndex(SfCellGrid)
Helper method for find the first visible row index in view.
Declaration
public static int GetFirstVisibleRowIndex(this SfCellGrid grid)
Parameters
Type | Name | Description |
---|---|---|
SfCellGrid | grid | An instance of SfCellGrid. |
Returns
Type | Description |
---|---|
System.Int32 | return the first row index when grid have visible row lines more than header row else returns headerrows. |
GetGridRow(SfCellGrid, Int32)
Returns the GridRow for the given RowIndex in SfCellGrid.
Declaration
public static GridRow GetGridRow(this SfCellGrid cellGrid, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
SfCellGrid | cellGrid | An instance of SfCellGrid. |
System.Int32 | rowIndex | Row Index. |
Returns
Type | Description |
---|---|
GridRow | An instance of GridRow. |
GetPointPosition(PointerRoutedEventArgs, UIElement)
Method which returns the mouse position in SfCellGrid.
Declaration
public static Point GetPointPosition(PointerRoutedEventArgs args, UIElement relativeTo)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | args | An System.Windows.Input.MouseEventArgs that contains the event data. |
Windows.UI.Xaml.UIElement | relativeTo | UIElement. |
Returns
Type | Description |
---|---|
Windows.Foundation.Point | Position of the pointer. |
GetPreviousVisibleColumnIndex(SfCellGrid, Int32)
Get the previous visible column index.
Declaration
public static int GetPreviousVisibleColumnIndex(this SfCellGrid grid, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
SfCellGrid | grid | An instance of SfCellGrid. |
System.Int32 | colIndex | Column Index. |
Returns
Type | Description |
---|---|
System.Int32 | Column Index |
GetPreviousVisibleRowColumnIndex(SfCellGrid, Int32, Int32)
Get the previous visible RowColumnIndex for given row and column index.
Declaration
public static RowColumnIndex GetPreviousVisibleRowColumnIndex(this SfCellGrid grid, int rowIndex, int columnIndex)
Parameters
Type | Name | Description |
---|---|---|
SfCellGrid | grid | An instance of SfCellGrid. |
System.Int32 | rowIndex | Row Index. |
System.Int32 | columnIndex | Column Index. |
Returns
Type | Description |
---|---|
RowColumnIndex | An instance of RowColumnIndex. |
GetPreviousVisibleRowIndex(SfCellGrid, Int32)
Get the previous visible row index.
Declaration
public static int GetPreviousVisibleRowIndex(this SfCellGrid grid, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
SfCellGrid | grid | An instance of SfCellGrid. |
System.Int32 | rowIndex | Row Index. |
Returns
Type | Description |
---|---|
System.Int32 | Row Index. |
GetVisibleRowColumnIndex(SfCellGrid, Int32, Int32)
Gets the visible RowColumnIndex for given row and column index.
Declaration
public static RowColumnIndex GetVisibleRowColumnIndex(this SfCellGrid grid, int rowIndex, int columnIndex)
Parameters
Type | Name | Description |
---|---|---|
SfCellGrid | grid | An instance of SfCellGrid. |
System.Int32 | rowIndex | Row Index. |
System.Int32 | columnIndex | Column Index. |
Returns
Type | Description |
---|---|
RowColumnIndex | An instance of RowColumnIndex. |