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
4028
"Invalid data source" error when changing DataSource
posted

I am using a chart (column chart) to show variable data. That is, the user selects the critiera they wish to chart, then press a button, and the data is generated and displayed on the chart. They then repeat this process till their hearts content.

This all works fine, so long as the chart is not visible (on a tab which is not visible). But if it is, I get the error:

Invalid data source, this type is unsupported data type. Supported data types accepted as valid data source are DataTable, DataView, DataSet, Array and IList

I am binding the chart to a datatable. Roughly, the code I'm using is:

dt = new DataTable();
// Generate dt data
ultraChart1.DataSource = dt;
ultraChart1.DataBind();

What am I doing wrong here? How can I load new data while the user is viewing the chart?

Parents
  • 4618
    Verified Answer
    posted

    Hi fweeee,

    From the information provided, I am unable to make any concrete conclusions; as dynamically modifying the data source or providing a new data source entirely, (granted that the provided data meets the criteria for the chart type) should not generate this error.

    I have constructed and attached a sample to model your scenario, where the expected behavior is observed. Please take a look at this implementation and feel free to modify it so that it resembles your project more closely or if possible, please provide an isolated sample of your own that I can review, where this behavior is produced.

    If you have any further questions regarding this issue in the meantime, please let me know.

    Sincerely,
    Chris K
    Developer Support Engineer
    Infragistics, Inc.
    www.infragistics.com/support

    DynamicallyChangeChartDS103276.zip
Reply Children
No Data