CategoryCount  Clipboard

Chapter 10: Methods for Graphs in the DataWindow Control

CategoryName

Description

Obtains the category name associated with the specified category number.

Syntax

string dwcontrol.CategoryName ( string graphcontrol, integer 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





Copyright © 2004. Sybase Inc. All rights reserved. Clipboard

View this book as PDF