Description
Recalculates the breaks in the grouping levels in a DataWindow.
Applies to
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore object |
Syntax
PowerBuilder
integer dwcontrol.GroupCalc ( )
Return value
Returns 1 if it succeeds and -1 if an error occurs.
If dwcontrol is null, in PowerBuilder and JavaScript the method returns null.
Usage
Use GroupCalc to force the DataWindow object to recalculate the breaks in the grouping levels after you have added or modified rows in a DataWindow.
GroupCalc does not sort the data before it recalculates the breaks. Therefore, unless you populated the DataWindow in a sorted order, call the Sort method to sort the data before you call GroupCalc.
Examples
This code imports new rows from a file into the DataWindow dw_emp and then recalculates the group breaks for dw_emp:
dw_emp.ImportFile("d:\employee.txt") dw_emp.SetRedraw(false) dw_emp.SetSort("1A") dw_emp.Sort() dw_emp.GroupCalc() dw_emp.SetRedraw(true)
See also