Class DataGridIndexResolver
Represents an extension class that provides an set of index resolver helper methods in SFDataGrid.
Inheritance
Inherited Members
Namespace: Syncfusion.WinForms.DataGrid
Assembly: Syncfusion.SfDataGrid.WinForms.dll
Syntax
public static class DataGridIndexResolver
Methods
GetAddNewRowIndex(SfDataGrid)
Gets the corresponding row index of the AddNewRow.
Declaration
public static int GetAddNewRowIndex(this SfDataGrid dataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
Returns
Type | Description |
---|---|
System.Int32 | Returns an index of the AddNewRow. |
GetDetailsViewDataGridRowIndex(SfDataGrid, DetailsViewDataGrid)
Gets the row index of the DetailsView.
Declaration
public static int GetDetailsViewDataGridRowIndex(this SfDataGrid dataGrid, DetailsViewDataGrid detailsViewDataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
DetailsViewDataGrid | detailsViewDataGrid | The DetailsViewDataGrid. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the row index of the DetailsView. |
GetFilterRowIndex(SfDataGrid)
Gets the FilterRowIndex of the data grid.
Declaration
public static int GetFilterRowIndex(this SfDataGrid dataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the row index of the FilerRow. |
GetHeaderIndex(TableControl)
Gets the header index of SFDataGrid.
Declaration
public static int GetHeaderIndex(this TableControl tableControl)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The SFDataGrid. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the header index of the SFDataGrid. |
GetRecordEntryAtRowIndex(SfDataGrid, Int32)
Gets the record for the specified row index.
Declaration
public static NodeEntry GetRecordEntryAtRowIndex(this SfDataGrid dataGrid, int index)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The corresponding dataGrid to get the record. |
System.Int32 | index | The row index to get the record. |
Returns
Type | Description |
---|---|
NodeEntry | The data item corresponding to the specified row index. Return null , if the row index is of AddNewRow ./// |
GetTableSummaryCount(TableControl, VerticalPosition)
Gets the total number of table summary rows in SFDataGrid according to the specified
Declaration
public static int GetTableSummaryCount(this TableControl tableControl, VerticalPosition position)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The table Control. |
VerticalPosition | position | Specifies the position of table summary row to get its count. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the number of table summary rows in SFDataGrid. |
GetUnboundRow(SfDataGrid, Int32)
Gets the UnboundRow for the specified row index.
Declaration
public static GridUnboundRow GetUnboundRow(this SfDataGrid dataGrid, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
System.Int32 | rowIndex | The row index to get the UnboundRow. |
Returns
Type | Description |
---|---|
GridUnboundRow | Returns the corresponding GridUnboundRow for the specified row index. |
GetUnboundRowsCount(SfDataGrid, VerticalPosition)
Gets the total number of UnboundRows in SfDataGrid according to the specified
Declaration
public static int GetUnboundRowsCount(this SfDataGrid dataGrid, VerticalPosition position)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
VerticalPosition | position | Specifies the position of unbound row to get its count. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the total number of UnboundRows in SfDataGrid. |
GetUnboundRowsCount(SfDataGrid, VerticalPosition, Boolean)
Gets the total number of UnboundRows in SfDataGrid according to the specified
Declaration
public static int GetUnboundRowsCount(this SfDataGrid dataGrid, VerticalPosition position, bool belowSummary)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
VerticalPosition | position | Specifies the position of UnboundRows to get its count. |
System.Boolean | belowSummary | Specifies whether the UnboundRow is placed above or below summary row. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the total number of UnboundRows in SfDataGrid. |
IsAddNewRowIndex(SfDataGrid, Int32)
Determines whether the specified row index is associated with AddNewRow.
Declaration
public static bool IsAddNewRowIndex(this SfDataGrid dataGrid, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
System.Int32 | rowIndex | The corresponding rowIndex to determine the AddNewRow. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the specified row index is AddNewRow; otherwise , false. |
IsFilterRowIndex(SfDataGrid, Int32)
Checks whether the given row index is the FilterRow index or not.
Declaration
public static bool IsFilterRowIndex(this SfDataGrid dataGrid, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
System.Int32 | rowIndex | The row index that needs to be checked as filter row index. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true, If the given row index is the FilterRow index; otherwise retruns false. |
IsTableSummaryIndex(TableControl, Int32)
Determines whether the specified row index is associated with TableSummaryRow.
Declaration
public static bool IsTableSummaryIndex(this TableControl tableControl, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The table Control. |
System.Int32 | rowIndex | The corresponding rowIndex to determine the TableSummaryRow. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the specified row index is TableSummaryRow; otherwise, false. |
IsUnboundRow(SfDataGrid, Int32)
Determines whether the specified row index is associated with any UnboundRow's.
Declaration
public static bool IsUnboundRow(this SfDataGrid dataGrid, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
System.Int32 | rowIndex | The corresponding rowIndex to determine the UnboundRow. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the specified row index is UnboundRow; otherwise, false. |
ResolveStartIndexBasedOnPosition(TableControl)
Resolves the start index position in SFDataGrid.
Declaration
public static int ResolveStartIndexBasedOnPosition(this TableControl tableControl)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The SFDataGrid. |
Returns
Type | Description |
---|---|
System.Int32 | Returns start index position in SFDataGrid. |
ResolveStartIndexOfGroup(TableControl, Group)
Resolves the start index of the specified group.
Declaration
public static int ResolveStartIndexOfGroup(this TableControl tableControl, Group group)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The SFDataGrid. |
Group | group | Specifies the group to get its corresponding start index. |
Returns
Type | Description |
---|---|
System.Int32 | The start index of the specified group; returns -1; if the column is not grouped in SFDataGrid. |
ResolveToGridVisibleColumnIndex(TableControl, Int32)
Resolves the visible column index for the specified column index in SFDataGrid.
Declaration
public static int ResolveToGridVisibleColumnIndex(this TableControl tableControl, int visibleColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The SFDataGrid. |
System.Int32 | visibleColumnIndex | The visibleColumnIndex. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the corresponding visible column index for the specified column index. |
ResolveToRecordIndex(TableControl, Int32)
Resolves the record index corresponding to the specified row index in SFDataGrid.
Declaration
public static int ResolveToRecordIndex(this TableControl tableControl, int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The SFDataGrid. |
System.Int32 | rowIndex | Specifies the row index to get its corresponding record index. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the record index of the specified row index in SFDataGrid. |
ResolveToRowIndex(TableControl, NodeEntry)
Resolves the row index corresponding to the specified NodeEntry.
Declaration
public static int ResolveToRowIndex(this TableControl tableControl, NodeEntry nodeEntry)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The TableControl. |
NodeEntry | nodeEntry | The Node entry. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the row index corresponding to the specified NodeEntry. |
ResolveToRowIndex(TableControl, Int32)
Resolves the row index corresponding to the specified record index in SFDataGrid.
Declaration
public static int ResolveToRowIndex(this TableControl tableControl, int recordIndex)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The SFDataGrid. |
System.Int32 | recordIndex | Specifies record index to get its corresponding row index. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the row index of the specified record index in SFDataGrid. |
ResolveToRowIndex(TableControl, Object)
Resolves the row index corresponding to the specified record.
Declaration
public static int ResolveToRowIndex(this TableControl tableControl, object recordItem)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The TableControl |
System.Object | recordItem | Specifies the record to get its corresponding row index. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the row index of the specified record. |
ResolveToScrollColumnIndex(TableControl, Int32)
Resolves the scroll column index for the specified column index in SFDataGrid.
Declaration
public static int ResolveToScrollColumnIndex(this TableControl tableControl, int gridColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The SFDataGrid. |
System.Int32 | gridColumnIndex | The corresponding column index to get the scroll column index. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the scroll column index for the specified column index. |
ResolveToStartColumnIndex(TableControl)
Resolves the start column index of the SFDataGrid.
Declaration
public static int ResolveToStartColumnIndex(this TableControl tableControl)
Parameters
Type | Name | Description |
---|---|---|
TableControl | tableControl | The SFDataGrid. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the start column index of the SFDataGrid. |
ResolveUnboundRowToRowIndex(SfDataGrid, GridUnboundRow)
Resolves row index for the specified GridUnboundRow.
Declaration
public static int ResolveUnboundRowToRowIndex(this SfDataGrid dataGrid, GridUnboundRow unboundRow)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid. |
GridUnboundRow | unboundRow | Specifies the UnboundRow to get its corresponding row index. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the row index of the specified UnboundRow. |