v
Not logged inv
SearchAsk a QuestionReport an IssueMake a SuggestionMy Questions and Issues
Issue Details
Find By ID

How to create a XtraCharts from a XtraGrid mantaining the filters created by the user on the grid?

Issue Details

Log in to Track Changes or Edit
CQ9811
Question
PORSEL Tecnica
Yes
Processed
Answered
.NET
XtraGrid Suite
6.2.4.0
Windows XP
Microsoft Visual Studio 2005
1/11/2007 11:24:09 PM
-> Created by PORSEL Tecnica 1/4/2007 1:33:30 PM

Hi,
I have an application with a GridControl and I what to create a ChartControl from my GridControl mantaining all the filters created by the user.
Someone can help me???

<- Reviewed by DevExpress Team 1/5/2007 9:22:46 AM
<- Processed (Answered) by DevExpress Team 1/5/2007 3:52:49 PM

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

-> Reactivated by PORSEL Tecnica 1/11/2007 12:46:18 PM

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'

<- Processed (Answered) by DevExpress Team 1/11/2007 11:24:08 PM

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

Log in to Track Changes or Edit

Peer-to-Peer Discussion in DevExpress Forums

No discussion on this article has been started yet.

Please login to start discussion.

v
v
Search
Searching Tips