This is a migrated thread and some comments may be shown as answers.

Chart / Radgrid with Filter

3 Answers 78 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 23 Nov 2010, 08:51 AM
Hello

We where exactly following your DEMO example "grouping and aggregation" with chart and radgrid, which works fine so far.

But when we put a filter in the radgrid the values are not changing, means that the chart is always taking the full data, regardless of the filter in radgrid.

Is there a way to maintain a chart that is "listening" to the radgrid filter?

thanks Thomas

3 Answers, 1 is accepted

Sort by
0
Andreas
Top achievements
Rank 1
answered on 23 Nov 2010, 01:19 PM
...i think it must work somehow when setting the ChartFilterDescriptor

I tried to do this in the FILTERED Event of my Radview.

But somehow i couldn't achieve so far how to convert a ColumnDescriptor of the RadGrid to a ChartFilterDescriptor

Can anyone help me on this?thanks

 

0
Andreas
Top achievements
Rank 1
answered on 23 Nov 2010, 03:49 PM
After i spend to much time on this filter issue i found the solution for myself

In radgrid.Filtered event just take the Filterdescriptor as they are and put them on the radchart
void RadGridView1_Filtered(object sender, GridViewFilteredEventArgs e)
        {
  
            RadChart1.FilterDescriptors.Clear();
              
            ///ColumnDescriptor durchgehen
            foreach (IFilterDescriptor Filter in RadGridView1.FilterDescriptors)
            {
                ///dein FilterDescriptor kann entweder ein DistinctValuesFilterDesc oder ein FieldDescriptor sein
                ///daher wird das Interface IFilterDescriptor verwendet, das funktioniert bei beiden
                ///im DistinctValuesFilterdescriptor stehen die Werte drinnen die benötigt werden
                ///
                RadChart1.FilterDescriptors.Add(Filter);
}
}
0
Sia
Telerik team
answered on 23 Nov 2010, 04:22 PM
Hi Thomas Roithmeier,

We are really sorry that you did not receive response in time. Please open a support ticket when your issue is urgent (because the response time then is 24 hours) and take in mind that every new post in a thread sends your message in the end of the queue with all pending tickets.

Nevertheless, we are happy to hear that your problem is solved. I assure you that this won't happen again if you conform to my advice.

Regards,
Sia
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
Chart
Asked by
Andreas
Top achievements
Rank 1
Answers by
Andreas
Top achievements
Rank 1
Sia
Telerik team
Share this question
or