Page 1 of 1

gantt bar values

Posted: Tue Feb 10, 2009 8:36 am
by 13051613
Hello,

I need to know the end values of the gantt bars.

with this line i get the start value of the bar:

Code: Select all

TChart2.Series(0).Item(e.Bar).X
how can i get the end value of the same bar?

Thanks

Posted: Tue Feb 10, 2009 10:01 am
by 10050769
Hello Pujo1986,

I recomended two ways for gets the stars values and ends values:

First way:

Code: Select all

        For i = 0 To gantt1.Count - 1
            startVal = gantt1.StartValues(i)
            endVal = gantt1.EndValues(i)
        Next
Second way:

Code: Select all

          
  For i = 0 To gantt1.Count - 1
            startVal = CType(TChart1.Series(0), Steema.TeeChart.Styles.Gantt).StartValues(i)
            endVal = CType(TChart1.Series(0), Steema.TeeChart.Styles.Gantt).EndValues(i)
  Next



I hope you have been served my help

Posted: Wed Feb 11, 2009 8:46 am
by 13051613
Hello,

i use this code, but always return the same value:

Code: Select all

Private Sub GanttToo2_DragBar(ByVal sender As Object, ByVal e As Steema.TeeChart.Tools.GanttDragEventArgs) Handles GanttTool2.DragBar

        MessageBox.Show(Gantt1.StartValues(e.Bar))
        drag = True

    End Sub 
the messagebox always show the initial end value of the bar, but this value does not change with the bar position.

any sugestion?

Thanks

Posted: Wed Feb 11, 2009 10:51 am
by 10050769
Hi Pujol1986,



We have reproduced a similar code runs successfully and you should play the following code and check if you work:

Code: Select all

    Private Sub GanttTool1_DragBar(ByVal sender As System.Object, ByVal e As Steema.TeeChart.Tools.GanttDragEventArgs) Handles GanttTool1.DragBar
        Me.Text = gantt1.StartValues(e.Bar).ToString()

    End Sub

You could say, what version of TeeChart .NET you are using?



Thanks in advance

Posted: Thu Feb 12, 2009 8:26 am
by 13051613
Hi,

i'm using teechart .net v3

this code returns the value on the dataset, but i need to know the value on the gantt.

it's posible?

Thanks.

Posted: Thu Feb 12, 2009 9:10 am
by 10050769
Hi Pujol1986,

Could you say the exactly version builder if you using of TeeChart .NET?.

Please, could you 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,

Posted: Thu Feb 12, 2009 9:34 am
by 13051613
Hi Sandra,

I see that when i change the value of a label in the form, the event "gantttool_dragbar" is executed without dragging any bar.

is this a bug?

i need to solve this problem before get the end value of the bar.

Thanks.

Posted: Thu Feb 12, 2009 10:21 am
by 10050769
Hi Pujol1986,


We need to know what version number you use, the version number in a file "Release.txt" which is located in C: \ Program Files \ Steema Software \ TeeChart for. NET v3 find that the number is like for exemple::TeeChart.NET version 3 Build 3.5.3225.32185
I see that when i change the value of a label in the form, the event "gantttool_dragbar" is executed without dragging any bar
We couldn't reproduce your issue. Please, could you 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.

I need to solve this problem before get the end value of the bar.

If you need help with this problem, please, could you send us a simple example project we can run "as-is" so we can help you. 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 Feb 13, 2009 4:21 pm
by 13051613
Hi, my release is:

Release Notes 30th January 2009
TeeChart.NET version 3
Build 3.5.3317.17532
Compiled for Visual Studio 2008
Build 3.5.3317.17531
Compiled in .NET Framework 2.0
Build 3.5.3317.17530
Compiled in .NET Framework 1.0

sorry, i don't have time now to upload sample code.
I do this thing by using a stored procedure on oracle data base.

i'll upload sample code as soon as posible.