Navigation:  Classes > bRecordGroup >

bRecordGroup:ExpandItems()

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

Expands one or all collapsed record group items.

Class

bRecordGroup

Type

Method

Syntax

<oRecordGroup>:ExpandItems(

<iOptions>,

[<auItem>]

) Æ lSuccess

Arguments

<iOptions>The options that are to be used when expanded the record group items. The following values are supported:

 

Option

Description

BRGEIO_NONE

No options are defined.

BRGEIO_EXPANDALL

Expand all record group items. The Argument auItem is not to be used.

BRGEIO_ITEM

The argument auItem contains objects of the class bRecordGroupItem.

BRGEIO_RECNO

The argument auItem contains the record numbers of the record group items.

BRGEIO_REGARDSUBITEMS

If a record group item contains sub items, then these are also expanded.

 

Data Type:DWord

 

<auItem>List of the record group items which are to be expanded. The list can contain either objects of the class bRecordGroupItem or the record numbers of the record group items.
Data Type:Array

Return Value

lSuccessA logical value that indicates whether the record group items could be expanded.
TRUEThe record group items were expanded.
FALSEThe record group items could not be expanded.
Data Type:Logic

Description

bRecordGroup:ExpandItems() expands one or all collapsed record group items.

 

Notes

With the option BRGEIO_EXPANDALL only these record group items are expanded which are already determined. So that the record group items are also expanded automatically which were not determined yet, the option BRGLO_AUTOOPENmust be defined in all record group levels in addition.

Samples

In the sample below all collapsed record group items in a bBrowser are expanded.

 

// Expand all already collapsed record group items
oBrowser:RecordGroup:ExpandItems(BRGEIO_EXPANDALL)
 
// Define the option BRGLO_AUTOOPEN in all record group levels so that the 
// record group items still to be determined are displayed expanded.
iCount := oBrowser:RecordGroup:LevelList:Count
for iPos := 1 upto iCount
  oRecordGroupLevel := oBrowser:RecordGroup:LevelList:Get(iPos)
  oRecordGroupLevel:Options := _Or(oRecordGroupLevel:Options, BRGLO_AUTOOPEN)
next

 

// Refresh the bBrowser

oBrowser:Server:GoTop()

oBrowser:Refresh()

See Also

bRecordGroup:LevelList

bRecordGroupItem

bRecordGroupLevel:Options

 


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