CategoryName

Description

Obtains the category name associated with the specified category number.

Applies to

PowerBuilder DataWindow DataWindow control

DataWindow Web ActiveX DataWindow control

Syntax

PowerBuilder

string dwcontrol.CategoryName ( string graphcontrol, integer categorynumber )

Web ActiveX

string dwcontrol.CategoryName ( string graphcontrol, number categorynumber )

Argument

Description

dwcontrol

A reference to the DataWindow control containing the graph

graphcontrol

A string whose value is the name of the graph in the DataWindow for which you want the name of a specific category

categorynumber

The number of the category for which you want the name

Returns

Returns the name of categorynumber in the graph named in graphcontrol. If an error occurs, it returns the empty string (“”). If any argument’s value is null, CategoryName returns null.

Usage

Categories are numbered consecutively, from 1 to the value returned by CategoryCount. When you delete a category, the categories are renumbered to keep the numbering consecutive. You can use CategoryName to find out the named category associated with a category number.

Examples

Example 1

These statements obtain the name of category 5 in the graph gr_revenues in the DataWindow control dw_findata:

string ls_name

ls_name = &

		dw_findata.CategoryName("gr_revenues", 5)

See also