Page 1 of 1

problem with DateTime (ASP.Net)

Posted: Tue Feb 26, 2008 4:17 pm
by 13047639
Hi,
I have problem with dataset (ASP.Net):

DataView dv = new DataView(ds.Tables[2]);


Steema.TeeChart.Chart ch1 = myChart1.Chart;

Steema.TeeChart.Styles.Line s1 = new Steema.TeeChart.Styles.Line(ch1);
ch1.Series.Add(s1);

ch1.Axes.Bottom.Labels.DateTimeFormat = "dd/MM/yyyy hh:mm:ss";
s1.YValues.DataMember = "Value";
s1.XValues.DateTime = true;
s1.XValues.DataMember = "ReadingTime";
// ch1.Series[0].SeriesData = ds.Tables[2].Columns["ReadingTime"].ToString();
s1.DataSource= dv; // here is error
s1.CheckDataSource();

Error message:
"Input string was not in a correct format".

I have no idea why is this error.
Similar code in Windows Forms is working.
please - help :)
Regards
Leszek

Posted: Wed Feb 27, 2008 10:30 am
by narcis
Hi Leszek,

Could you please try doing as in the example Christopher Ireland posted here?

You may also be interested in checking the example pw posted here on the 6th of February 2006.

If the problem persists, could you please post or send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Posted: Wed Feb 27, 2008 11:51 am
by 13047639
Thanks Narcis,
I forgot to set type (DateTime) in datasource.
Now is working
Regards.
Leszek