Hi,
When I click on any data in Gantt Chart I need to know its id (i.e. value from IdColumnIndex) .
Unfortunatly I can't find IdColumnIndex value in ChartDataClicked event...
Is it possible? Any workaround?
Thank you,
Mitri
misael77,
are you using the ASP.NET webchart? due to serialization issues, e.Primitive will always be Nothing during a postback.
Hi Mitri,
I've been tried with your code but e.primitive always returns Nothing; any idea to solve it? Here is the VB code I'm using:
Infragistics.UltraChart.Core.Primitives.Primitive
prim = e.Primitive
Then
Infragistics.UltraChart.Data.GanttItem
itmSelected =
(prim.DataPoint, Infragistics.UltraChart.Data.GanttItem)
straux = itmSelected.Key
If
Graham, thank you, it works!
Mitri,
Try this code for ChartDataClicked:
void ultraChart1_ChartDataClicked(object sender, Infragistics.UltraChart.Shared.Events.ChartDataEventArgs e)
{
Primitive prim = e.Primitive;
if ((prim.Tags != null) &&
prim.Tags.ContainsKey("TIME_ENTRY_INDEX"))
int index = (int)(prim.Tags["TIME_ENTRY_INDEX"]);
GanttItem ganttItem = prim.DataPoint as GanttItem;
if (ganttItem != null)
if (index < ganttItem.Times.Count)
GanttTimeEntry ganttTimeEntry = ganttItem.Times[index];
MessageBox.Show(ganttTimeEntry.ID.ToString());
}
-Graham