Hi all,
in a gantt chart I have some tasks in the same series on different left axes position with the same StartValue. Ex:
gantt.StartValues[0] = 123456;
gantt.StartValues[1] = 123456;
knowing the start value I want to retreive the StartValues index but doing:
int index = gantt.StartValues.IndexOf(123456);
index is always 0 and I don't find a function like IndexOf to call again to find the second index.
Any idea? Thanks in advance
Same StartValues
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Cinin,
You could do something like the code below to get all points indexes with a fixed StartValue.
You could do something like the code below to get all points indexes with a fixed StartValue.
Code: Select all
for (int index=0;index<gantt1.Count;++index)
{
if (gantt1.StartValues[index]==12345)
{
tChart1.Header.Text=tChart1.Header.Text+", "+index.ToString();
}
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Cinin,
I'm sorry but it's the way for doing it. We maybe could add a method like NextIndexOf or so but internally it would do something similar to what I did so it's not worth.
I'm sorry but it's the way for doing it. We maybe could add a method like NextIndexOf or so but internally it would do something similar to what I did so it's not worth.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |