Hi,
I'm using GanttChart (Infragistics 8.1) and I'd like to add custom icons to my GanttItemEntries (datapoints) but I have a problem.
I've read that if you want add something to the Chart you must handle FillSceneGraph event and add what you want.
Ok, but my problem is the following:
when FillSceneGraph event is raised, datapoints aren't drawn yet (infact the last events raised are ChartDrawItem but you cannot add primitives in those)
I need to know the exact location of datapoints to add my icons, so I need to wait when drawing is finished, but there's no event (or I can't see it) that call me when the last datapoint is drawn.
Any suggestion ?
Thanks in advance
sorry for my bad english
when FillSceneGraph is raised, the entire chart will be drawn by that point. what leads you to belileve that the datapoints aren't drawn yet? what do you get for e.SceneGraph.Count ?
I thought fillscenegraph was the last event raised but I was wrong (chartDrawItem is the last)
My problem is that when fillscenegraph is raised I can only iterate over the primitives but I can't understand if a Box correspond to a datapoint (GanttTimeEntry) and which of them.
There is a way to understand that ?
Thank you
Ok thank you for the help, I solve my problem :)
usually the Box will have its DataPoint set to a GanttItem and you can get its TimeEntry using
GanttItem item = box.DataPoint as GanttItem;
int timeEntryIndex = Convert.ToInt32(box.Tags["TIME_ENTRY_INDEX"]);
GanttTimeEntry entry = item.Times[timeEntryIndex];