Reset

Description

Deletes the data, the categories, or the series from a graph.

Reset is for graphs within a DataWindow object with an external data source. It does not apply to other graphs in DataWindow objects because their data comes directly from the DataWindow.

Applies to

PowerBuilder DataWindow

DataWindow control

Syntax

PowerBuilder

integer dwcontrol.Reset ( grResetType graphresettype )

Argument

Description

dwcontrol

A reference to the DataWindow control containing the graph.

graphresettype

A value of the grResetType enumerated datatype specifying whether you want to delete only data values or all series and all data values:

  • All! -- Delete all series, categories, and data in dwcontrol.

  • Category! -- Delete categories and data in dwcontrol.

  • Data! -- Delete data in dwcontrol.

  • Series! -- Delete the series and data in dwcontrol.


Return value

Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, Reset returns null. The return value is usually not used.

Usage

Use Reset to clear the data in a graph before you add new data.

Examples

PowerBuilder

This statement deletes the series and data, but leaves the categories, in the graph gr_product_data in the DataWindow dw_prod. The DataWindow object has an external data source:

dw_prod.Reset("gr_product_data", Series!)