Page 1 of 1

Retrieving series data as a dataset

Posted: Fri Nov 07, 2008 2:40 am
by 9787981
Hello.

Can you please confirm that the following mechanism I'm using is fully supported, and it something that will always be supported.

I'm populating a line series by adding X(time), Y values. These are being added at a frequency say of 20 seconds. I then execute the following code to retrieve the DataSource of the series as a DataSet:

System.Data.DataSet penData = penSeries.DataSource as System.Data.DataSet;

This results in a DataSet retrieved from the series of all the sample pairs it currently contains. Repeating the above command returns the same dataset, even though new samples have been added. In order for me to retrieve the data including the new samples added since the last time the above command was executed, I have to also do the following:

penSeries.DataSource = null;

Only after setting the series DataSource to null, will I be able to retrieve all the samples from the series again.

Is this expected behaviour?

thanks,
Ben.

Posted: Fri Nov 07, 2008 9:53 am
by narcis
Hi Ben,

Could you please send us a simple example project we can run "as-is" to reproduce the issue here and let us know the TeeChart version you are using?

You make an example similar to Christopher Ireland's posted 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: Fri Nov 07, 2008 5:37 pm
by 9787981
Hi NarcĂ­s,

I have uploaded the test VS.NET project in a zip file called TeechartSeriestoDataGridView.zip.

If you run the application, you'll see one pen is created and samples (Time, value) are added every 5 seconds. When you click on the "Update Grid' button you'll see that the DataGridView instance will be updated with the entire set of samples contained in the series. If you look at the Click event handler for that button, you'll see how I've done this. Note, the 'nulling' out of the series.DataSource property is key to this functionality working (i.e. getting the full set of samples, the next time the button is clicked).

This functionality is good for our application and I'm hoping that it is officially supported for this version and later versions of the Steema TeeChart. (This version is 2.0.3203.23271/2).

thanks,
Ben.

Posted: Mon Nov 10, 2008 11:15 am
by narcis
Hi Ben,

Thanks for the example project.
Only after setting the series DataSource to null, will I be able to retrieve all the samples from the series again.

Is this expected behaviour?
Yes, this is by design.
Can you please confirm that the following mechanism I'm using is fully supported, and it something that will always be supported.
No. We can confirm that if the behviour is changed then an alternative mechanism will be made available to reproduce it.