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
750
excluding specific rows from GanttChart
posted

Greetings!

 

I have a grid (well that grid's datasource actually) backing a UltraChart that's a Gantt type. There are particular rows in the grid that I want excluded from the from that Gantt chart based on the value in cell of in the row. How can I do this? Setting the column indices for the gantt chart data isn't good enough, e.g.

 

 

chartGantt.GanttChart.Columns.SeriesLabelsColumnIndex = -1

chartGantt.GanttChart.Columns.ItemLabelsColumnIndex = grid.DisplayLayout.Bands(0).Columns("Name").Index

chartGantt.GanttChart.Columns.StartTimeColumnIndex = grid.DisplayLayout.Bands(0).Columns("Start").Index

chartGantt.GanttChart.Columns.EndTimeColumnIndex = grid.DisplayLayout.Bands(0).Columns("End").Index

chartGantt.GanttChart.Columns.IDColumnIndex = grid.DisplayLayout.Bands(0).Columns("ID").Index

chartGantt.GanttChart.Columns.LinkToColumnIndex = -1 

chartGantt.GanttChart.Columns.PercentCompleteColumnIndex = grid.DisplayLayout.Bands(0).Columns("completepercent").Index

chartGantt.GanttChart.Columns.OwnerColumnIndex = -1

 

 

This won't do because I can't  filter out rows. I tried copying the desired data from the grid/datasource to a GanttDataSource bound to the chart but that made the chart static until the data in the GanttDataSource is updated. We need the chart to be updated when users edit the values in the grid.  I tried setting the Empty property to true on the GanttItem objects added to the GanttSeries but that didn't work either.

The GanttDataSource is not visible in the VS Designer toolbix otherwise I might try to drop it on the form and attach it to the grid. However, the grid has additional information that is not storeable in the GanttDataSource. 

 

Any suggestions?