Help binding data to a silverlight chart control from a sql datasource (best practices)

6 posts, 0 answers
  1. Scott
    Scott avatar
    6 posts
    Member since:
    Feb 2011

    Posted 11 Mar 2011 Link to this post

    Hello,
    Any help would be greatly appreciated...and time is running out...

    Page Layout
    I have a number of listbox controls (rad ajax listbox controls) down the left side of my asp.net aspx page.  I have a Silverlight CHART control on the right side of the page.

    User Interaction
    The user selects items from each of these listbox controls to determine what data they want to look at.  When they are done they click an asp.net button control called "Generate chart" which goes out to sql server which runs a stored proc. and returns a dataset to the asp.net page all done through the code behind.  The user may decide after generating the chart to make different filtering selections and hit the asp.net button to display the new results in the silverlight chart.

    The problem
    I need the results from the sql stored proc that is sitting in a dataset in my code behind file to be bound to the silverlight chart.  I am new to silverlight and am not sure what is the best/easiest way to display this data.

    I need a sure fire way of getting these results displayed in the chart control when the user presses the asp.net button...remembering that I am using a silverlight control on an asp.net aspx page.  Each time the user presses the "Generate Chart" button I would want the new results in the sql dataset displayed in the silverlight control.

    Thanks in advance for any help/links you can provide...
    Scott
  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 17 Mar 2011 Link to this post

    Hello Scott,

    Take a look at the Todd Anglin's webcast which describes how to integrate Silverlight controls in ASP.NET. For practical example with source code - you can review our integration demo that vizualises our Silverlight Chart in ASP.NET page. 
    In the code behind of your ASP.NET page, you can simply bind and render the chart when the page loads.
    The following demo with full source code demonstrates RadChart for ASP.NET databound to SQL database.

    All the best,
    Evgenia
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. Scott
    Scott avatar
    6 posts
    Member since:
    Feb 2011

    Posted 21 Mar 2011 Link to this post

    Yes, I have looked at Todd Anglin's webcast and downloaded the project code associated with this web cast...I am having problems with the Extension.cs class references to

    DataContractJsonSerializer


    It appears the solution Todd is using is written for Silverlight 3.0 and I am using 4.0 and the parameters allowed have changed.  Any idea of how this Extension.cs class would look like if it was written for SL 4.0?

    I have quickly running out of available time to work on this project and any quick help would be greatly appreciated...

    Thanks,
    Scott
  4. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 22 Mar 2011 Link to this post

    Hi Scott,

    As Microsoft stated in their documentation DataContractJsonSerializer is still supported in Silverlight 4.
    You may find the Todd's project attached, updated to work with SL 4.

    All the best,
    Evgenia
    the Telerik team
  5. Tommy
    Tommy avatar
    1 posts
    Member since:
    Mar 2011

    Posted 05 Apr 2011 Link to this post

    I looked at all the examples you provided but how would you go about calling a sql datasource if you are usin a project/solution and not a website? I've been trying to research is there any examples you could possible provide me?
  6. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 10 Apr 2011 Link to this post

    Hello Tommy,



    Could you be more specific about your requirement? What do you mean that a project/solution and not a website should be bound to an sql datasource?



    Best wishes,

    Evgenia

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top