Skip to content

Class: cCJGridPromptList

Properties | Events | Methods | Index of Classes

Used to provide Prompt Lookup Lists

Hierarchy

cObject > cUIObject > DfComUIObject > DfInPlaceComObject > DfComActiveXControl > cComActiveXControl > cCJGridControl > cCJGrid > cCJGridPromptList

Show full hierarchy and direct subclasses

Library: Windows Application Class Library

Package: cCJGridPromptList.pkg

Description

The cCJGridPromptList class is a non-data-aware version of the cDbCJGridPromptList class and provides a prompt list that does not use Data Dictionaries. You must provide the data to be loaded into the list. This would normally be done inside of Activating using the standard mechanism of building your datasource array and the sending InitializeData.

A lookup list will consist of a modal panel parent (ModalPanel), a child prompt list grid (cCJGridPromptList) and some child buttons. When Popup is sent to the modal panel, the child prompt list grid is populated, a selection is made and the invoking view is updated with the choice.

The cCJGridPromptList class extends the cCJGrid class. It uses the cCJGridColumn class for its column objects and uses an internally created cCJGridDataSource class for its datasource object, which is created automatically.

The following provides an overview of the cDbCJGridPromptList class. You should refer to Using Grids for a complete overview of the grid classes. The Class Reference will provide you with syntactical and usage information about the grid classes.

Using Prompt Lists

The following could be used inside of a prompt list modal panel instead of cDbCJGridPromptList.

Object oSelList is a cCJGridPromptList
    Set Size to 71 248
    Set Location to 6 6
    Set peAnchors to anAll

    Object oID is a cCJGridColumn
        Set piWidth to 50
        Set psCaption to "ID"
    End_Object

    Object oName is a cCJGridColumn
        Set piWidth to 100
        Set psCaption to "Name"
    End_Object

    Procedure Activating
        tDataSourceRow[] MyData

        Forward Send Activating

        // load the list with five values 
        Move "AA" to MyData[0].sValue[0]
        Move "AA name" to MyData[0].sValue[1]

        Move "BB" to MyData[1].sValue[0]
        Move "BB name" to MyData[1].sValue[1]

        Move "CC" to MyData[2].sValue[0]
        Move "CC name" to MyData[2].sValue[1]

        Move "DD" to MyData[3].sValue[0]
        Move "DD name" to MyData[3].sValue[1]

        Move "EE" to MyData[4].sValue[0]
        Move "EE name" to MyData[4].sValue[1]

        Send InitializeData MyData
    End_Procedure    

End_Object

See Also

tDataSourceRow