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

Remove selection filters

5 Answers 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 18 Oct 2010, 02:23 AM
I would like to leave the main filtering but to remove the list of items type of filter.  How do you turn that off?

By the way I am working on the c# code necessary to pass the filters to devforce so they are executed on the server.  If someone has already done this, please share.

5 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 20 Oct 2010, 09:26 AM
Hello Andrew,

You can control the filtering through setting the following boolean properties in your columns ShowDistinctFilters controls the top part of the FilteringControl, and ShowFieldFilters that controls the visibility of the bottom part.
Hope this helps.

Kind regards,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andrew
Top achievements
Rank 1
answered on 20 Oct 2010, 05:00 PM
It worked, I was able to ditch the top part of the filter.  But unfortunately for a checkbox column I was unable to get a filter to appear.  Why can I not filter a checkbox column, it should be simple, checked, unchecked, or null should always be options, or at least checked or unchecked.  This is a serious flaw since the binary fields exist because I need them as filters.

Also you need to add these options to the grid definition so that when columns are autogenerated they can also be set, and also so you can set the defaults and not have to set each column.  The goal is always no repetitive coding, and this is really repetitive.

I need a solution to the filtering on the checkbox column ASAP please.
0
Vanya Pavlova
Telerik team
answered on 22 Oct 2010, 11:27 AM
Hi Andrew,

These properties are designed to work it GridViewColumns, and there is no way to set this property once and when you auto generate its columns to get different filters in each column. Even if you handle AutoGeneratingColumn event of the RadGridView you should check what column type is generated and set the corresponding property. These properties should be set either in xaml or in code. Considering your second question about GridViewCheckBoxColumn you do not need to set ShowDistinctFilters to False, because in this way you will get only the Filter and Clear Filter buttons. Actually you do not need to set anything on that column type and you will get the default behaviour.

I have prepared an example for you that uses the mentioned properties.

Best wishes,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andrew
Top achievements
Rank 1
answered on 27 Oct 2010, 12:30 AM
My only issue is that when you have a checkbox column and all the columns in memory are true or false, then only those filter options appear.  i.e. True only or False only, not both.  You need to show both regardless of what you think is in the data, since filters are sometimes passed to the database for execution.

0
Scott
Top achievements
Rank 1
answered on 20 Sep 2011, 01:04 AM
Hi Vanya -
Turning off the top part of the filter is something I asked about in another similar thread.  Thanks for the answer.
Tags
GridView
Asked by
Andrew
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Andrew
Top achievements
Rank 1
Scott
Top achievements
Rank 1
Share this question
or