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

DistinctFilter binding

1 Answer 45 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Cameron
Top achievements
Rank 1
Cameron asked on 13 Feb 2014, 08:19 PM
Sorry if this has been discussed, I searched but did not find anything.  I have the below code in the code behind of my View, but would like to move it to the viewmodel and use binding to set it.  I know how to set everything up except for binding the DistinctFilter.  Is this possible?  If you need more information, I'll try to provide as much as I can.

private void ChartSelectionBehavior_SelectionChanged(object sender, Telerik.Windows.Controls.ChartView.ChartSelectionChangedEventArgs e)
        {
            grid.FilterDescriptors.SuspendNotifications();
 
            IColumnFilterDescriptor filter = grid.Columns["Status"].ColumnFilterDescriptor;
            filter.SuspendNotifications();
 
            foreach (var point in e.AddedPoints)
            {
                var value = ((PieChartData)point.DataItem).Label;
                filter.DistinctFilter.AddDistinctValue(value);
            }
 
            foreach (var point in e.RemovedPoints)
            {
                var value = ((PieChartData)point.DataItem).Label;
                filter.DistinctFilter.RemoveDistinctValue(value);
            }
 
            filter.ResumeNotifications();
            grid.FilterDescriptors.ResumeNotifications();
 
        }

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 18 Feb 2014, 11:19 AM
Hi,

I am afraid it is not possible to bind the values for the DistinctFilter.

Regards,
Didie
Telerik
Tags
GridView
Asked by
Cameron
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or