Purpose
Defines a condition whether an item can be selected.
Class
bSelectCondition
Properties
Selectable | (Access / Assign) |
Methods
Inherits From
<No ancestor>
Inherited By
<No descendants>
Description
For several rows, columns or cells the select ability can be defined with a condition.
The class bSelectCondition is supported in the class bDataColumn.
Samples
The following sample defines a 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
Page url: http://www.YOURSERVER.com/index.html?bselectcondition.htm