Runtime editor (DataSource)

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Bernd
Newbie
Newbie
Posts: 1
Joined: Fri Nov 28, 2003 5:00 am
Location: Germany

Runtime editor (DataSource)

Post by Bernd » Fri Dec 05, 2003 9:39 am

Hi,

i still try to edit the datasource of a series at runtime. I hope now, as a registered user, i can get the attention of someone monitoring this forum :).

Steema.TeeChart.Styles.Line series = new Steema.TeeChart.Styles.Line() ;
tChart.Series.Clear() ;
tChart.Series.Add( series ) ;
series.DataSource = dataSet ;
DataTable dt = dataSet.Tables[0] ;
series.LabelMember = dt.Columns[1].ColumnName ;
series.YValues.DataMember = dt.Columns[3].ColumnName ;

So far it works fine. The chart is displayed and shows the expected data.

But when showing the editor

Steema.TeeChart.Editors.SeriesEditor.ShowEditor( tChart[0], Steema.TeeChart.Editors.ChartEditorTabs.SeriesDataSource ) ;

i see two entries in the dataset combo box and the other fields are disabled. The two entries refer to (elements of) a strongly typed DataSet used in another part of the application and not to the anonymous dataset assigned a few statements before.

Has anyone an idea what is wrong here ?


Bernd F. Hoffmann

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Wed Dec 10, 2003 1:15 pm

Hi!
Has anyone an idea what is wrong here ?
Mmm. Well, I've tried to reproduce this problem here using the following steps:
1. Follow the steps in "Tutorial 8 - ADO.NET Database Access" -> Connecting to ADO.NET at design-time.
2. Right-click over oleDbDataAdapter1 and select "Generate Dataset.." .. rename the dataset "dataSet".
3. Paste the following code into the form:

Code: Select all

private void Form1_Load(object sender, System.EventArgs e)
{
  Steema.TeeChart.Styles.Line series = new Steema.TeeChart.Styles.Line() ; 
  tChart1.Series.Clear() ; 
  tChart1.Series.Add( series ) ; 
  oleDbDataAdapter1.Fill(dataSet,"Employee");
  DataTable dt = dataSet.Tables[0] ; 
  series.LabelMember = dt.Columns[1].ColumnName; 
  series.YValues.DataMember = dt.Columns[3].ColumnName; 
  series.DataSource = dataSet ; 
}

private void button1_Click(object sender, System.EventArgs e) {
  Steema.TeeChart.Editors.SeriesEditor.ShowEditor( tChart1[0], Steema.TeeChart.Editors.ChartEditorTabs.SeriesDataSource ) ; 
}
Everything seems to be working OK under these circumstances. Could you please verify that the above works OK for you? If you are still experiencing problems, could you please specify the exact steps I need to take to reproduce the problem here?
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply