Obtains the category name associated with the specified category number.
PowerBuilder DataWindow DataWindow control
DataWindow Web ActiveX DataWindow control
string dwcontrol.CategoryName ( string graphcontrol, integer categorynumber )
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 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.
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.
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)