problems BINDING a GANTT series to a datatable

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Adrian
Advanced
Posts: 116
Joined: Thu Jun 23, 2005 4:00 am

problems BINDING a GANTT series to a datatable

Post by Adrian » Wed Nov 08, 2006 5:03 am

Hi there,
I'm trying to bind a gantt series to a datatable.

I have a datatable DT with 4 columns, Start,end,rownum and label

I use the following code to create a new series, which I think should be bound to the datatable. However the series doesn't draw.

Code: Select all

  
Dim x As New Steema.TeeChart.Styles.Gantt
x.DataSource = dt
x.StartValues.DataMember = "start"
x.EndValues.DataMember = "end"
x.YValues.DataMember = "rownum"
x.LabelMember = "label"

If however i use

Code: Select all

For Each row As DataRow In dt.Rows
   x.Add(row("start"), row("end"),row("rownum"), row("label"))
Next
it does draw....

Am I doing something wrong in my binding example or is there a bug?

I really need it to bind to the datatable.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Nov 08, 2006 10:56 am

Hi Adrian,

You'll find an example of this here.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply