Current filter:
          You should refresh the page.
          Not Logged In

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

          0
            • 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???

          0

          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

          0

          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'

          0

          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

          You must  log in  or  register  to leave an answer