Navigation:  Classes > bDataColumn >

bDataColumn:SelectCondition

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

List of select conditions that are to be considered for selecting cell values.

Class

bDataColumn

Type

Access

Data Type

bSelectConditionList

Description

With the access bDataColumn:Selectable selecting of values can be enabled or disabled for the column. If selecting is enabled for column values, then additional select conditions can be defined with the access bDataColumn:SelectCondition in order to define when a cell value may be selected. For example it is possible, that a cell value can be selected only if a field contains a certain value.

 

Whether selectable conditions are defined can be checked with the method bDataColumn:ExistSelectConditions().

Samples

The following sample defines an select condition for the column #DEC with that selecting is prevented provided the field #TYPE does not contain the value "N".

 

LOCAL oasDBSTRUCT      AS bArrayServer

LOCAL auStruct         AS ARRAY

LOCAL oBrowser         AS bBrowser

LOCAL oColumn          AS bDataColumn

LOCAL oSelectCondition AS bSelectCondition

 

// create bArrayServer

auStruct := {;

                               {"NAME", "C", 10, 0},;

                               {"TYPE", "C", 1, 0},;

                               {"LEN", "N", 3, 0},;

                               {"DEC", "N", 2, 0};

                       }

oasDBSTRUCT := bArrayServer{auStruct}

 

// create bBrowser

oBrowser := bBrowser{oOwner,;

                                               1000,;

                                               Point{0, 0},;

                                               Dimension{300, 250}}

oBrowser:Use(oasDBSTRUCT)

oBrowser:Show()

 

// determine column #DEC

oColumn := oBrowser:GetColumn(#DEC)

IF oColumn<>NULL_OBJECT

       // define select condition

       oSelectCondition := bSelectCondition{'Server:TYPE<>"N"',;

                                                                                oasDBSTRUCT,;

                                                                                FALSE}

       oColumn:SelectCondition:Add(oSelectCondition)

ENDIF

See Also

bDataColumn:ExistSelectConditions()

bDataColumn:Selectable

bSelectCondition

bSelectConditionList

 


Page url: http://www.YOURSERVER.com/index.html?bdatacolumn_selectcondition.htm