This is my first time using Infragistics. I literally have only a couple of days experience yet have a tight timeline to get this resolved.
I have an existing piece of code that loads up a GanttChart. The chart itself is a visual of how many detailed items we may hvae for a given year. So, the gantt chart will ONLY be one row with many "columns" What I fail to see
is how the ChartDataEventArgs has NO data. Given I will have one "row" of data the ONLY data item that comes back is the "row" index the user clicked on which is always ZERO. Basically the chart looks like a multi-colored bar where the color changes when we have new data. I need to know which color was clicked on. For example you will see two months of red, followed by 3 months of green, followed by 4 months of blue (the X axis has months of the year). I need to know which of the 3 "columns" was clicked so I know what detailed data to show. I wanted to find some way of adding data to the ChartDataEventArgs so I know what was clicked.
UltraChart1.Series.Clear();
> approvedColors = UltraChart1.SetTimelineColors();
();
value
r.EffectiveDate).Distinct();
GanttItem
{
Label =
)
};
dateStrings)
.ToString(rate.ID), rate.EffectiveDate, rate.ExpirationDate,
.FromArgb(approvedColors.Pop()), rate.ID);
product.Times.Add(t1);
}
series.Items.Add(product);
UltraChart1.Series.Add(series);
UltraChart1.SetDefaultXAxis(UltraChart1,
.ToInt32(ddlBenefitRange.SelectedValue)), 01, 01));
A GanttItem is considered to be a single entity even though it can create multiple shapes with the Times collection, so Row and Column for each TimeEntry in a single GanttItem will always be the same. For windows gantt chart we added a time entry index to the e.primitive.tags, but unfortunately this can't be done for the web chart. To do this with the web chart is tricky. Since e.Primitive will be null for the web chart, the only way that I can think of to get the value is by handling the clientside ClientOnMouseClick event to get the value parameter. It will contain the start date - end date string. You would have to pass it to the server, at which point it can be parsed and used to create start and end time. After that, you can loop through the Times collection of your GanttItem and based on the start and end dates determine the index of the current time entry. Sorry there isn't an easier way to do this
there is any way in vb2005
use in the event ChartDataClicked options
e.DataColumn e.DataRowreturns the same value, thenHow do I know that selected index?