Page 1 of 1

Same StartValues

Posted: Tue Aug 30, 2005 2:07 pm
by 9637812
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

Posted: Wed Aug 31, 2005 9:24 am
by narcis
Hi Cinin,

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();
				}
			}

Posted: Wed Aug 31, 2005 3:33 pm
by 9637812
Thank you,

this is the way I'm doing it now but I was looking for something more "smart".

Regards

Posted: Thu Sep 01, 2005 10:38 am
by narcis
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.