ComponentOne FlexPivot for WinForms
C1.Win.FlexPivot.4.5.2 Assembly / C1.Win.FlexPivot Namespace / C1FlexPivotGrid Class / GetCellCheck Method
Row index.
Column index.

In This Topic
    GetCellCheck Method (C1FlexPivotGrid)
    In This Topic
    Gets the state of the checkbox in a grid cell.
    Syntax
    'Declaration
     
    Public Overridable Function GetCellCheck( _
       ByVal row As Integer, _
       ByVal col As Integer _
    ) As CheckEnum
    public virtual CheckEnum GetCellCheck( 
       int row,
       int col
    )

    Parameters

    row
    Row index.
    col
    Column index.

    Return Value

    One of the values in the C1.Win.C1FlexGrid.CheckEnum enumeration.
    Remarks

    By default, the grid displays values in Boolean columns as check boxes (the column's data type determined by the C1.Win.C1FlexGrid.RowCol.DataType property). If you don't want Boolean values displayed as check boxes, set the column's C1.Win.C1FlexGrid.RowCol.Format property to a string containing the values that should be displayed for True and False values, separated by a semi-colon. For example:

    flex.Cols["CheckBoxes"].DataType = typeof(bool); flex.Cols["yesNo"].DataType = typeof(bool); flex.Cols["yesNo"].Format := "Yes;No";

    In unbound mode, you can use the C1.Win.C1FlexGrid.C1FlexGridBase.GetCellCheck and C1.Win.C1FlexGrid.C1FlexGridBase.SetCellCheck methods to add check boxes to any cells. The check boxes will be displayed along with any text in the cell, and you can set their position using the column's C1.Win.C1FlexGrid.RowCol.ImageAlign property.

    There are two types of check boxes: Boolean and tri-state. Boolean check boxes toggle between the C1.Win.C1FlexGrid.CheckEnum.Checked and C1.Win.C1FlexGrid.CheckEnum.Unchecked states. Tri-state check boxes cycle through the settings C1.Win.C1FlexGrid.CheckEnum.TSChecked, C1.Win.C1FlexGrid.CheckEnum.TSUnchecked, and C1.Win.C1FlexGrid.CheckEnum.TSGrayed.

    For example, the code below creates a Boolean checkbox in cell (3,3) and a tri-state checkbox in cell (4,3):

    flex.SetCellCheck(3, 3, CheckEnum.Unchecked) // Boolean; flex.SetCellCheck(4, 3, CheckEnum.TSUnchecked) // tri-state;
    See Also