{Help Request} RadChart + RadGrid / Selected Index

Thread is closed for posting
2 posts, 0 answers
  1. John
    John avatar
    22 posts
    Member since:
    Jan 2011

    Posted 10 Jun 2012 Link to this post

    I have a RadChart and RadGrid populated with items. (The Datasources are different due to the returned data but they have the same DataKey values)

    How can I quickly allow the user to select any of the items on the Radchart and make that the SelectedRow for the RadGrid? (the items will share the same DataKey value) 

    I want them to be able to click the bar chart item and then have the corresponding record highlighted on the Radgrid below the chart.

    I tried attaching an event handler for the Click events which seems to create event behavior I would expect, but I am having trouble linking these two controls together in the manner I would like.  I believe there would be a quick clientside solution for this so I can simply get a reference to the RadGrid, find the row with a DataKey value that matches the one that it was called from, and make that the SelectedRow so it will be highlighted to the user.  Sounds good in theory but I am having trouble with implementation of such a scenario.

    Any help is appreciated
  2. Petar Marchev
    Petar Marchev avatar
    968 posts

    Posted 13 Jun 2012 Link to this post

    Hello John,

    It is not possible to link the RadChart and RadGrid with out-of-the-box means. However, with some java script I think you will be able to do it. I have attached a simple project to demonstrate one approach you can use. Do examine it and see if you can adapt this to your current project.

    All the best,
    Petar Marchev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top