Hi,
I want to display some data from an UltraDataSource in an UltraGrid. At the same time I want an UltraChart beeing bound to that data, too. Is it possible to reflect UltraGrid filtering of grid rows in the UltraChart with no efford? And if so, could you provide me with a small example?
Regards,
Michael
Hello Michael,
I made small sample for you. Could you please take a look at the attachement and let me know if you have any questions.
Regards
Georgi thank you for the example!
Your solution is good, but not exactly what I wanted. Changes in the Grid's values are reflected in the chart. That's fine. But what I want is some data over time (day/value pairs) and the days can be filtered by the grid and the chart will not show those days filtered out.
HI,
Have you been able to resolve your issue ? Did you have a time to try my suggestion.If you still have any concerns or questions I will be glad to help. If you need any additional assistance don’t hesitate to ask.
Maybe you could achievde desired behavior if you are using :
private void ultraGrid1_AfterRowFilterChanged(object sender, Infragistics.Win.UltraWinGrid.AfterRowFilterChangedEventArgs e) { var FilteredRows = from p in ultraGrid1.Rows.GetFilteredInNonGroupByRows() select new { DateTime = (DateTime)p.GetCellValue(p.Band.Columns[0]), Value = (Decimal)p.GetCellValue(p.Band.Columns[1]), }; this.ultraChart1.DataSource = FilteredRows.ToList(); }
private void ultraGrid1_AfterRowFilterChanged(object sender, Infragistics.Win.UltraWinGrid.AfterRowFilterChangedEventArgs e)
{
var FilteredRows = from p in ultraGrid1.Rows.GetFilteredInNonGroupByRows()
select new
DateTime = (DateTime)p.GetCellValue(p.Band.Columns[0]),
Value = (Decimal)p.GetCellValue(p.Band.Columns[1]),
};
this.ultraChart1.DataSource = FilteredRows.ToList();
}
Please take a look at the attached sample and video for more details and let me know if you have any questions.
I should precise my demands a little bit. What I think of is a chart that is bound to a grid's filtered in rows rather than to a data source. So this might be the real question of is this possible and if so, how?