kazuhiro Posted July 30, 2007 Report Share Posted July 30, 2007 Hi, I get NullReferenceException when I bind an array of nullable intergers which starting with a null value. For instance: myChart.DataSourceSettings.DataSource = new ListProvider(new int?[] { null, 1, 2, 3, 4 }); // NullReferenceException thrown. Is there any way to walk around this problem? I do want that null value as a placeholder. Regards,Kazuhiro Quote Link to comment Share on other sites More sharing options...
Frank Posted July 30, 2007 Report Share Posted July 30, 2007 The ListProvider does not support nullable value type at this point. You will need to pass an array of doubles like this: myChart.DataSourceSettings.DataSource = new ListProvider(new double[] { Chart.Hidden, 1, 2, 3, 4 }); Or you can use the Data API to pass the values one by one. We will fix issue this in the next Service Pack. Quote Link to comment Share on other sites More sharing options...
kazuhiro Posted July 30, 2007 Author Report Share Posted July 30, 2007 I thought ListProvider supports nullable values since it worked fine unless null value was placed at the head of the series. Anyway, Chart.Hidden solved my problem. Thanks a lot, and I'm looking forward to the next service pack! Kazuhiro Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.