Bind Database to Silverlight 4 Chart

Posted on 2011-02-21
Last Modified: 2012-05-11
How do I Bind a Database to my Silverlight 4 Chart with VB
Question by:dpdmembers
  • 3
  • 3
LVL 25

Expert Comment

ID: 34957233
Silverlight doesn't support any database providers. You need to get the data using a web service or wcf service. This data willbe put in a data model and will be binded to silverlight chart control.

Author Comment

ID: 34963339
I have created the service but I need help with the binding to the chart.  I can bind it to a datagrid but not a chart.
LVL 25

Expert Comment

ID: 34972132
can we your xaml code and binding code?
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!


Author Comment

ID: 34972356

<UserControl x:Class="SilverlightWithWCFService.MainPage"
    d:DesignHeight="650" d:DesignWidth="525" xmlns:sdk="" xmlns:toolkit="">

    <Grid x:Name="LayoutRoot" Background="White" Height="650" Width="847">
           <toolkit:Chart  HorizontalAlignment="Left" Margin="27,432,0,0" Name="Chart1" Title="LEI Index" VerticalAlignment="Top" Height="206" Width="452">
                <toolkit:ColumnSeries x:Name="ColumnSeries1" Title="Index"  
                                  IndependentValueBinding="{Binding Observation}"
                                  DependentValueBinding="{Binding LEI_Index}"
                                   ItemsSource="{Binding}"   />

Behind Code

 Private Sub client_LEIListCompleted(ByVal sender As Object, ByVal e As LEIListCompletedEventArgs)
          ColumnSeries1.ItemsSource = e.Result
    End Sub

LVL 25

Accepted Solution

apeter earned 500 total points
ID: 34985780
e.Result has a property Observation and LEI_Index? Try binding the itemsource or datacontext of toolkit:chart control.

Author Closing Comment

ID: 35006553
Examples would be nice

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now