Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
UltraChart Binding problems:
posted

Using:  VS 2008, C#.net

I am trying to use the UltraChart object to bind to a datatable in code as follows:

 

 

 

 

void UpdateQualityChart(object sender, EventArgs e)

{

 

   DataTable dt = new DataTable();

   dt = _sqlData.CreateQualityDataSet();

   uChtQuality.DataSource = dt;

   uChtQuality.Data.DataBind();

   dt.Dispose();

}

I have verified that there are 10 rows of data in the table.

I created the chart by dragging and dropping on the form (not in code).

There are no errors and my project builds/runs without warnings or errors but the chart just

shows the standard "Data Not Available" message.

Any example code/project would be appreciated.

 

 

Parents
No Data
Reply
  • 2406
    posted

    Hi,

    The DataSource of the chart is a reference to the DataTable you create and when you Dispose it (the last line of your code), you indeed dispose the DataSource of the chart. You just do not have to dispose the table and will not have a problem.

Children
No Data