menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SelectionHelper - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SelectionHelper

    Represents an extension class that provides the methods for selection in DataGrid.

    Inheritance
    System.Object
    SelectionHelper
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.WinForms.DataGrid.Interactivity
    Assembly: Syncfusion.SfDataGrid.WinForms.dll
    Syntax
    public static class SelectionHelper

    Methods

    GetDetailsViewDataRowIndex(SfDataGrid, DetailsViewDataGrid)

    Gets the row index of the DetailsViewDataRow which contains the DetailsViewDataGrid.

    Declaration
    public static int GetDetailsViewDataRowIndex(this SfDataGrid dataGrid, DetailsViewDataGrid detailsViewDataGrid)
    Parameters
    Type Name Description
    SfDataGrid dataGrid

    The parent data grid.

    DetailsViewDataGrid detailsViewDataGrid

    The DetailsView data grid.

    Returns
    Type Description
    System.Int32

    Returns the row index of the DetailsViewDataRow which contains the DetailsViewDataGrid.

    GetDetailsViewGrid(SfDataGrid, Int32)

    Gets the DetailsView grid in the given row index.

    Declaration
    public static DetailsViewDataGrid GetDetailsViewGrid(this SfDataGrid dataGrid, int rowIndex)
    Parameters
    Type Name Description
    SfDataGrid dataGrid

    The parent grid.

    System.Int32 rowIndex

    The row index.

    Returns
    Type Description
    DetailsViewDataGrid

    Returns the DetailsView grid in the given row index.

    GetDetailsViewGrid(SfDataGrid, Int32, String)

    Gets the DetailsView grid from the given row index and relational column.

    Declaration
    public static DetailsViewDataGrid GetDetailsViewGrid(this SfDataGrid dataGrid, int rowIndex, string relationalColumn)
    Parameters
    Type Name Description
    SfDataGrid dataGrid

    The parent datagrid.

    System.Int32 rowIndex

    The row index of the detailsview grid to be retrieved.

    System.String relationalColumn

    The relation column of the detailsview grid to be retrieved.

    Returns
    Type Description
    DetailsViewDataGrid

    Returns the DetailsView grid that matches the given row index and relational column.

    GetRecordAtRowIndex(SfDataGrid, Int32)

    Gets the record for the specified row index.

    Declaration
    public static object GetRecordAtRowIndex(this SfDataGrid dataGrid, int index)
    Parameters
    Type Name Description
    SfDataGrid dataGrid

    The corresponding DataGrid to get the record.

    System.Int32 index

    The corresponding row index to get the record.

    Returns
    Type Description
    System.Object

    The data item corresponding to the specified row index. Return the null , if the specified row index is of AddNewRow .

    GetSelectedCellInfo(SfDataGrid, RowColumnIndex)

    Gets the SelectedCellInfo in the given row and column index.

    Declaration
    public static SelectedCellInfo GetSelectedCellInfo(this SfDataGrid sfDataGrid, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    SfDataGrid sfDataGrid

    The DataGrid.

    RowColumnIndex rowColumnIndex

    The row and column index of the cell.

    Returns
    Type Description
    SelectedCellInfo

    Returns the SelectedCellInfo in the given row and column index.

    GetSelectedDetailsViewGridRowIndex(SfDataGrid)

    Gets the row index of the selected DetailsView grid.

    Declaration
    public static int GetSelectedDetailsViewGridRowIndex(this SfDataGrid dataGrid)
    Parameters
    Type Name Description
    SfDataGrid dataGrid

    The parent grid.

    Returns
    Type Description
    System.Int32

    Returns the row index of the selected DetailsView grid.

    GetTopLevelParentDataGrid(SfDataGrid)

    Gets the top level parent DataGrid of the grid.

    Declaration
    public static SfDataGrid GetTopLevelParentDataGrid(this SfDataGrid dataGrid)
    Parameters
    Type Name Description
    SfDataGrid dataGrid

    The child DataGrid.

    Returns
    Type Description
    SfDataGrid

    Returns the top level parent DataGrid of the grid.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved