Tim Huffam

Dotting the I and crossing the T of I.T.

  Home  |   Contact  |   Syndication    |   Login
  129 Posts | 0 Stories | 874 Comments | 677 Trackbacks

News

Archives

Post Categories

Interesting Blogs/Links

The following error can occur when executing the .DataBind() method on a Dundas chart object within an ASP.Net page (.Net 3.0):

Series data points do not support values of type "myclass", only values of these types can be used: Double, Decimal, Single, int, long, uint, ulong, String, DateTime, short, ushort.

I had set the DataSource property to a generics List of myclass objects (List<myclass>).

It turns out that this error is caused by a mismatch between the type of objects within the list passed to DataSource and the series defined for the chart.

In my case I had create 4 series but the objects within the list only had 3.  I'm guessing the same error would also occur if the property names of these objects to not match the series .ValueMembersY/ValueMemberX property settings.

HTH
Tim

posted on Thursday, June 12, 2008 8:23 AM