Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
Get IdColumnIndex value in Gantt Chart
posted

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

Parents
  • 30692
    Verified Answer
    Offline posted

    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

Reply Children