PORSEL Tecnica
01.04.2007
Hello,
In general, the GridControl and ChartControl use filters in different formats. However, you can obtain the filter criteria from the GridControl and apply it to the chart's data source. For example:
Imports DevExpress.XtraEditors
Imports DevExpress.XtraGrid.FilterEditor
...
Dim filter As FilterControl = New FilterControl()
filter.FilterCriteria = GridView1.ActiveFilterCriteria
filter.SourceControl = MyChartDataSource ' should be DataTable
filter.ApplyFilter()
...
ChartControl1.DataSource = MyChartDataSource
Please note that the you should undate
Thank you,
Paul
I have the following messages when i use this code:
Imports DevExpress.XtraEditors
Imports DevExpress.XtraGrid.FilterEditor
...
Dim filter As FilterControl = New FilterControl()
filter.FilterCriteria = GridView1.ActiveFilterCriteria
filter.SourceControl = MyChartDataSource ' should be DataTable
filter.ApplyFilter()
Error messages:
'FilterCriteria' is not a member of 'DevExpress.XtraEditors.FilterControl'
'SourceControl' is not a member of 'DevExpress.XtraEditors.FilterControl'
'ApplyFilter' is not a member of 'DevExpress.XtraEditors.FilterControl'
Hello,
I'm sorry, I should have specified that to make this code work, you should upgrade your controls up to the latest version (6.3.2). If you don't want to upgrade at the moment, you can use the approach described in the How to get a list of the data rows in a filtered grid article.
Thank you,
Paul