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
185
DataBinding error
posted

Based on this KB article , I am implementing drill down winchart. I upgraded the sample code to use ver 8.1 CLR 2 and sample works fine but my code, is not working.

Data is not binding to graph and I get following error "Data Not Available. Please call UltraChart.Data.DataBind() after setting valid Data.DataSource"

I am not sure why I am getting this error. Here is my code

                    this.ultraChartGeneral.ChartType = ChartType.BarChart3D;
                    this.ultraChartGeneral.Legend.Visible = true;

                    // Set DataSource Option 1:
                    this.ultraChartGeneral.DataSource = mChartControlBL.GetChartData();
                    this.ultraChartGeneral.DataBind();

                    // Set DataSource Option 2:
                    //this.ultraChartGeneral.Data.DataSource = mChartControlBL.GetChartData();
//                    this.ultraChartGeneral.Data.DataBind();

 

GetChartData() method returns data table but for some reason, it doesn't bind to graph. What am I missing?

Thanks,

 

 

Parents
No Data
Reply
  • 28496
    Offline posted

    i don't think you're missing anything, and i'm confused why you would get that message if you're sure you're setting the DataSource property to a DataTable and then calling DataBind().

    is it possible for you to provide a sample project which reproduces the problem?

Children