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

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

5 Answers 110 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 11 Mar 2011, 07:48 PM
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

5 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 17 Mar 2011, 07:25 AM
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!
0
Scott
Top achievements
Rank 1
answered on 21 Mar 2011, 04:43 PM
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
0
Evgenia
Telerik team
answered on 22 Mar 2011, 06:37 PM
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
0
Tommy
Top achievements
Rank 1
answered on 05 Apr 2011, 05:46 PM
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?
0
Evgenia
Telerik team
answered on 10 Apr 2011, 09:01 PM
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
Tags
Chart
Asked by
Scott
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Scott
Top achievements
Rank 1
Tommy
Top achievements
Rank 1
Share this question
or