10377 : I cant find TimeItem from specific item like index.

Question

I cant find TimeItem from specific item like index.
How can I find TimeItem from specitfic item in 5 GanttRows?

Answer

To get to a specific time item you need to know the Layer, the GanttRow or the GridNode (you can iterate thru GridNodes if do not have a specific node). Then if you have a GridNode (worst case) you can go like this:

GridNode gn=gantt1.Grid.GridStructure.RootNodes[0];
GanttRow gr = GanttRow.FromGridNode(gn);
TimeItem ti=gr.Layers[theindexofLayer(probably 0 if you only have one layer)][theIndexOfTimeItemWithinLayer];

Leave a Reply