ComponentOne VSFlexGrid 8.0
SubtotalPosition Property

Returns or sets whether subtotals should be inserted above or below the totaled data.

Syntax

[form!]VSFlexGrid.SubtotalPosition[ = SubtotalPositionSettings ]

Remarks

The settings for the SubtotalPosition property are described below:

 

Constant

Value

Description

flexSTBelow

0

Subtotals are inserted below the data. This setting creates grids that look like reports.

flexSTAbove

1

Subtotals are inserted above the data. This setting creates grids that look like outline trees (this is the default value).

 

The SubtotalPosition property affects the placement of subtotals added using the Subtotal method and also the appearance and behavior of the OutlineBar. When SubtotalPosition is set to flexSTAbove, parent nodes appear at the top of the grid, like a standard tree control. When SubtotalPosition is set to flexSTBelow, parent nodes appear at the bottom of the grid, giving the tree an upside-down appearance.

The example below shows how to insert a subtotal positioned below the calculated values:

    Private Sub Form_Load()

       fg.rows=3

     fg.TextMatrix(1, 1)="Rent": fg.TextMatrix(1, 2)="234"

     fg.TextMatrix(2, 1)="Rent": fg.TextMatrix(2, 2)="335"

        fg.SubtotalPosition = flexSTBelow

        fg.Subtotal flexSTSum, 1, 2   

    End Sub

Data Type

SubtotalPositionSettings (Enumeration)

Default Value

flexSTAbove (1)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback