Page 1 of 1

problems BINDING a GANTT series to a datatable

Posted: Wed Nov 08, 2006 5:03 am
by 9637403
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.

Posted: Wed Nov 08, 2006 10:56 am
by narcis
Hi Adrian,

You'll find an example of this here.