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

Thread is closed for posting
2 posts, 0 answers
  1. Randy
    Randy avatar
    73 posts
    Member since:
    Oct 2007

    Posted 19 Mar 2009 Link to this post

    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
  2. Dessy
    Admin
    Dessy avatar
    73 posts

    Posted 23 Mar 2009 Link to this post

    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.
Back to Top