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
65
Gantt Chart - Respond to Individual Time Entry click events
posted

Support,

 

I have created a User Control that takes a Dictionary of a certain class as a param for its constructor.  It iterates through this dictionary and creates a GanttDataSource then GanttSeries, Item, and TimeEntry objects to populate it and assigns the chart's data source to the GanttDataSource.

I am wanting to respond to each Time Entry object's click event and display information under the control appropriately.  The following code came up in a search of the forums and claimed to allow you to retrieve the Index of the Time Entry (the column and row gave me the Series and Item) but the e.Primitive value is Null each time.


   protected void UltraChart1_ChartDataClicked(object sender, Infragistics.UltraChart.Shared.Events.ChartDataEventArgs e)
    {
        if (e.Primitive == null) return;
       
       
        GanttItem item = e.Primitive.DataPoint as GanttItem;
        int timeEntryIndex = (int)e.Primitive.Tags["TIME_ENTRY_INDEX"];

}

 

Is this possible with the UltraChart control?

  • 28496
    Offline posted

    unfortunately e.Primitive is not persisted to the server between postbacks, so this solution is not possible using ASP.NET.