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

Filtering boolean column

3 Answers 168 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Maciej Aniserowicz
Top achievements
Rank 1
Maciej Aniserowicz asked on 12 Jan 2010, 09:23 AM

Hi,

I fill the grid like this:

bindingSource.DataSource = typeof(MyClass); //MyClass has a property of boolean type which are represented by checkboxes in the grid as well as string properties

grid.EnableFiltering = true;
grid.MasterGridViewTemplate.EnableFiltering = true;

grid.DataSource = bindingSource;

//refresh the binding source

As you can see, I enable filtering programatically. The problem is that no filtering for bool columns is available. I can filter text columns by manually entering some text in the filter row (however no menu/editor/designer is shown for this, I can only enter text and the LIKE operator is applied automatically), but there is no way to filter checkbox columns.

What can be the cause of such strange behavior, how can I solve this problem?

Thanks,

Maciej Aniserowicz

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 13 Jan 2010, 09:08 AM
Hi Maciej Aniserowicz,

Yes, the default value for filtering of boolean columns is disabled. You should use the filter cell menu to change the predicate from none to equals for example. Just click on the funnel button. If this is not the case, please give me a detailed description about how to reproduce the issue and I will be glad to assist you further.

I am looking forward to your reply.

Regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Maciej Aniserowicz
Top achievements
Rank 1
answered on 13 Jan 2010, 09:39 AM

Thanks for the advice, but the clicking on the button has no effect. As I wrote before, I can only enter text in text filter cells - i cannot choose the operator to be used.

This problem occurs only in this one grid. Maybe the type of data bound objects can cause this? Each instance has properties of the following types:

string, int, bool, Guid, DateTime?, my custom type

Other views work as expected...

0
Jack
Telerik team
answered on 13 Jan 2010, 10:03 AM
Hello Maciej Aniserowicz,

Yes, the issue is perhaps caused by some logic in your application. Please sent it and I will try to locate the problem and find a proper solution.

I am looking forward to your reply.

Greetings,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Maciej Aniserowicz
Top achievements
Rank 1
Answers by
Jack
Telerik team
Maciej Aniserowicz
Top achievements
Rank 1
Share this question
or