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

I cant retrieve Information from database

1 Answer 87 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shirley
Top achievements
Rank 1
Shirley asked on 27 Mar 2012, 10:31 PM
Hi I have a Silverlight Project. In a Project I have a connection to database by ADO.NET, in the other project i need to do a query to the database, but i cant get information:

using

 

 

PowerIndicadores.Web;

namespace

 

 

PowerIndicadores

{

 

public partial class MainPage : UserControl

{

 

public MainPage()

{

InitializeComponent();

 

//needed for the 3D zoom & interactivity out-of-the-box

chart1.DefaultView.ChartArea.Extensions.Add(

 

new CameraExtension());

chart2.DefaultView.ChartArea.Extensions.Add(

 

new CameraExtension());

chart3.DefaultView.ChartArea.Extensions.Add(

 

new CameraExtension());

 

fopsDomainContext dbContext = new fopsDomainContext();

 

var query = (from p in dbContext.temp_kpi_prod_leadtimeregistrostemas select p.nmbre_lnea_inv);


 

 

 

 

Thanks a lot.

Shirley

 

 


1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 30 Mar 2012, 01:58 PM
Hi Shirley,

You can retrieve data from database using a technology of your choice (like Ado.NET, Linq to SQL, Entity Framework, etc.) and store this data in objects. Then you can bind your RadChart to the collection of these objects and set the SeriesMapping accordingly. Here you may find helpful information how to populate RadControls with data. You may also take a look at our RadChart documentation where we demonstrated how to bind RadChart to Northwind sample database using WCF service or ADO.NET Data Service. There are also online examples with source code provided of RadChart databound to an SQL datasource.
Please note that consuming data from SQL database is beyond the support scope of our RadChart control.
 
If you have some concrete question regarding one of our controls , do let us know and we'll be glad to help.

Regards,
Evgenia
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Chart
Asked by
Shirley
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or