Navigation:  Classes >

bEditCondition

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

Defines a condition for whether an edit is supported.

Class

bEditCondition

Properties

Editable(Access / Assign)

Methods

Eval()

Init()

Inherits From

<No ancestor>

Inherited By

<No descendants>

Description

For several rows, columns or cells the edit ability can be defined with a condition.

 

The edit conditions are supported both in the class bBrowser and in the class bDataColumn.

Samples

The following sample defines an edit condition for the column #DEC with that the edit 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 oEditCondition AS bEditCondition

 

// 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 editable condition

 oEditCondition := bEditCondition{'Server:TYPE<>"N"',;

                                                                  oasDBSTRUCT,;

                                                                  FALSE}

 oColumn:EditCondition:Add(oEditCondition)

ENDIF

See Also

bBrowser:EditCondition

bDataColumn:EditCondition

bEditConditionList

bSample - Edit

 


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