Navigation:  Classes > bBrowser >

bBrowser:EditCondition

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

List of edit conditions that are to be considered for editing cell values.

Class

bBrowser

Type

Access

Data Type

bEditConditionList

Description

With the access bBrowser:Editable editing of column values can be enabled or disabled for the whole bBrowser. If editing is enabled, then additional edit conditions can be defined with the access bDataColumn:EditCondition in order to define when a record may be edited. For example, it is possible that a record can be edited only if a field contains a certain value.

 

Whether edit conditions are defined can be checked with the method bBrowser:ExistEditConditions().

 

In addition to the edit conditions in the bBrowser, edit conditions can be defined with the access bDataColumn:EditCondition for a column also.

 

The bBrowser uses the method bBrowser:IsCellEditable() to check whether for a certain column value the edit is supported.

Samples

The following sample defines an edit condition for revoked orders. With this condition, editing is only permitted for the record if the field #REVOKE does not contain the value TRUE.

 

LOCAL odbsORDER      AS DBServer

LOCAL oBrowser       AS bBrowser

LOCAL oEditCondition AS bEditCondition

 

// Open the database to be used with the browser

odbsORDER := DBServer{"ORDER.DBF"}

IF odbsORDER:Used

 // instantiate bBrowser and show it

 oBrowser := bBrowser{oOwner,;

                                          1000,;

                                          Point{0, 0},;

                                          Dimension{300, 250}}

 oBrowser:Use(odbsORDER)

 oBrowser:Show()

 

 // Define the edit condition on the server and 

 // apply to the browser

 oEditCondition := bEditCondition{'Server:REVOKE',;

                                                                  odbsORDER,;

                                                                  FALSE}

 oBrowser:EditCondition:Add(oEditCondition)

ENDIF

See Also

bBrowser:Editable

bBrowser:ExistEditConditions()

bBrowser:IsCellEditable()

bDataColumn:EditCondition

bEditCondition

bEditConditionList

bSample - Edit

 


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