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

Column Filter - Selected Items

9 Answers 62 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Victor
Top achievements
Rank 1
Victor asked on 13 Jan 2014, 06:13 AM
Hi,

We have a problem with the grid filters. Can`t find the property or method to see what items are selected in filter.
Is it posssible to get list of items that is checked?

Please supply solution to this issue.

9 Answers, 1 is accepted

Sort by
0
Victor
Top achievements
Rank 1
answered on 15 Jan 2014, 10:42 AM
Someone here? The the problem still actual. Really waiting for your response. 
0
Dimitrina
Telerik team
answered on 16 Jan 2014, 11:21 AM
Hello,

You could access the GridViewDataColumn.ColumnFilterDescriptor in code and then check the values assigned to its DistincFilter.

Please check our online documentation for more information on the matter.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Victor
Top achievements
Rank 1
answered on 18 Jan 2014, 07:03 AM
Hi, thanks for reply. But I find only how to add unique(disctinct) value or get the list of them. But i need to get list of value which is marked in checkboxes (look at img in 1st post). So the problem is still actual :(

Waitng for ur answer
0
Accepted
Hristo
Telerik team
answered on 20 Jan 2014, 04:42 PM
Hello,

Basically, you have to create a list of DistinctValues during the Filtered event.

You can use the following code snippet as an example:
private void RadGridView_Filtered(object sender, Telerik.Windows.Controls.GridView.GridViewFilteredEventArgs e)
        {
            var filterCheckedItems = e.ColumnFilterDescriptor.DistinctFilter.DistinctValues.ToList();
        }


Regards,
Hristo
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Victor
Top achievements
Rank 1
answered on 21 Jan 2014, 05:39 AM
Thanks a lot, it works!
0
Victor
Top achievements
Rank 1
answered on 28 Jan 2014, 07:13 AM
Hi, i have one more troble. Filtered event used only when filter button pressed, or if property IsFilteringDeferred set false in every click on some values. 

So here is a problem. I need to get the list of selected values in filter, but i don`t whant to refresh grid or press the button. Is it possible or not? Maybe every time I checked/unchecked value, some tmp list will be edited. 
0
Dimitrina
Telerik team
answered on 30 Jan 2014, 03:11 PM
Hi,

The Filtered event is an UI event. It will only be raised on a user interaction.

The list of the distinct values is displayed in a ListBox. You could subscribe for its SelectionChanged event and keep track of the items being selected.

I hope this helps.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Victor
Top achievements
Rank 1
answered on 03 Feb 2014, 09:43 AM
Hi,

I think it could help, but if it possible, can u make an example of subscribing to this event, or how a can access to this ListBox from code

 

0
Dimitrina
Telerik team
answered on 04 Feb 2014, 01:33 PM
Hi,

I am afraid this cannot be done from code, as the FilteringControl is displayed in a popup. You could try modifying the template of the FilteringControl and having the instance of the ListBox implement your additional logic.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Victor
Top achievements
Rank 1
Answers by
Victor
Top achievements
Rank 1
Dimitrina
Telerik team
Hristo
Telerik team
Share this question
or