This is a special column that you can add to a cDbCJGrid/cDbCJGridPromptList. Its primary purpose is to make it possible to select multible records for a dynamic grid (pbStaticData = False). And the second purpose is to be able to select other columns with the mouse without actually selecting it but just give focus to the row.

Click image for larger version. 

Name:	Test.jpg 
Views:	628 
Size:	34.0 KB 
ID:	4035

One new function in the subclass has been added to get the selected records.
Code:
Function SelectedRecords Returns RowID[]
Otherwise just add an object of this class to the grid and that's pretty much it. You might set pbEditable to false for the other columns for a cDbCJGrid to make it clear for the end user what you want them to do. Have a look at the example code.

Attached is the subclass cDbCJGridSelectColumn and a test view for the Order Entry example workspace that shows how to use the column in a cDbCjGrid.
Test.vw
Code:
Use Windows.pkg
Use DFClient.pkg
Use cDbCJGrid.pkg
Use Customer.DD
Use cDbCJGridSelectColumn.pkg

Deferred_View Activate_oTest for ;
Object oTest is a dbView
    
    Object oCustomer_DD is a Customer_DataDictionary
    End_Object

    Set Main_DD to oCustomer_DD
    Set Server to oCustomer_DD

    Set Border_Style to Border_Thick
    Set Size to 162 300
    Set Location to 2 2

    Object oDbCJGrid1 is a cDbCJGrid
        Set Size to 125 280
        Set Location to 7 7

        Object oCustomer_Name is a cDbCJGridColumn
            Entry_Item Customer.Name
            Set piWidth to 296
            Set psCaption to "Customer Name"
            Set pbEditable to False
        End_Object

        Object oCustomer_Balance is a cDbCJGridColumn
            Entry_Item Customer.Balance
            Set piWidth to 79
            Set psCaption to "Balance"
            Set pbEditable to False
        End_Object
        
        Object oSelectedCol is a cDbCJGridSelectColumn
            Set piWidth to 45
            Set psCaption to "Select"
        End_Object
        
    End_Object

    Object oSelectedRows_bn is a Button
        Set Location to 138 237
        Set Label to "Selected"
    
        // fires when the button is clicked
        Procedure OnClick
            RowID[] rwSelected
            Integer iSize
            Get SelectedRecords of oSelectedCol to rwSelected
            Move (SizeOfArray(rwSelected)) to iSize
            Send Info_Box ("Selected records: " + String(iSize))
        End_Procedure
    
    End_Object

Cd_End_Object
cDbCJGridSelectColumn.pkg
Code:
Use cdbCJGridColumn.pkg

Class cDbCJGridSelectColumn is a cDbCJGridColumn
    
    Procedure Construct_Object
        Forward Send Construct_Object
        
        {DesignTime = False}
        Property RowID[] prwSelectedRecords

        Set pbCheckbox to True

    End_Procedure

    
    // Returns a list of RowIDs for the selected rows.
    Function SelectedRecords Returns RowID[]
        RowID[] rwSelectedRows
        Get prwSelectedRecords to rwSelectedRows
        Function_Return rwSelectedRows
    End_Function

    
    {Visibility = Private}
    Function SearchSelectedRowId RowID rwA RowID rwB Returns Integer
        If (IsSameRowID(rwA, rwB)) Function_Return (EQ)
        Function_Return (NE)
    End_Function
    
    
    Procedure OnSetCalculatedValue String ByRef sValue
        RowID[] rwSelected
        RowID rwCurrent
        Integer iFoundItem iFileNumber
        Handle hDDO
        Forward Send OnSetCalculatedValue (&sValue)
        Get prwSelectedRecords to rwSelected
        Delegate Get Server to hDDO
        If (hDDO <> 0) Begin
            Get Main_File of hDDO to iFileNumber
            If (iFileNumber <> 0) Begin
                Move (GetRowID(iFileNumber)) to rwCurrent    
            End
        End
        Move (SearchArray(rwCurrent, rwSelected, Self, RefFunc(SearchSelectedRowId))) to iFoundItem
        If (iFoundItem = -1) Begin
            Get CheckedStateToValue False to sValue
        End
        Else Begin
            Get CheckedStateToValue True to sValue 
        End
    End_Procedure
    
    
    Procedure OnEndEdit String sOldValue String sNewValue
        RowID[] rwSelected
        RowID rwCurrent
        Integer iFoundItem
        Boolean bSelected
        Handle hDDO
        Forward Send OnEndEdit sOldValue sNewValue
        Get prwSelectedRecords to rwSelected
        Delegate Get Server to hDDO
        If (hDDO <> 0) Begin
            Get CurrentRowId of hddo to rwCurrent
        End
        Move (SearchArray(rwCurrent, rwSelected, Self, RefFunc(SearchSelectedRowId))) to iFoundItem
        Get ValueToCheckedState sNewValue to bSelected
        If bSelected Begin
            If (iFoundItem = -1) Begin
                Move (SizeOfArray(rwSelected)) to iFoundItem
                Move rwCurrent to rwSelected[iFoundItem]
                Set prwSelectedRecords to rwSelected
            End
        End
        Else Begin
            If (iFoundItem <> -1) Begin
                Move (RemoveFromArray(rwSelected, iFoundItem)) to rwSelected
                Set prwSelectedRecords to rwSelected
            End
        End
    End_Procedure


    Procedure OnCreateColumn
        RowID[] rwTom
        Forward Send OnCreateColumn
        Set prwSelectedRecords to rwTom
    End_Procedure
    
    
End_Class
Have fun