This is a migrated thread and some comments may be shown as answers.

Is there a way to store a Id for each series item

1 Answer 53 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 19 Mar 2009, 03:44 PM
I am trying to determine how best to store off a key that goes with each series item.  I guess  I'm looking for a way to tag each series item so that when a user select it, I can get this Id so I can pass to another page.  I'd like to get this from RadGrid1_Click event.    I am currently using the XValue2 property and that seems to work because I'm just showing Pie or Bar charts only,  I doubt that is what I should be doing.  We are not using databinding and I am building the series by hand. 

Just a background on why I need this.  We are displaying a bar chart that shows a list of Items and their value.  When the user clicks one of the items, I need to go to our DB and retrieve more details.  Everything in our DB is keyed by a unique Id. 

I didn't see this covered in the documentation but I'm sure it's possible.

Thanks

1 Answer, 1 is accepted

Sort by
0
Dessy
Telerik team
answered on 23 Mar 2009, 10:15 AM

Hi Randy,

There is no designated property for this purpose. You have already found the workaround -- use XValue2 or any other unused ChartSeriesItem property - YValue2, YValue3,  YValue4, Name, Label. Note, that if you use the Label  property the ID will appear as a label, so this would be suitable only if you do not plan to show item labels. In a similar way -- you can use the Name property only if it is OK to let the ID appear in the legend (usually in a pie chart with LegendDisplayMode = "ItemLabels") or if the legend is hidden.

Hope this helps.

Regards,

Dessy
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
Randy
Top achievements
Rank 1
Answers by
Dessy
Telerik team
Share this question
or