Filtering boolean column

4 posts, 0 answers
  1. Maciej Aniserowicz
    Maciej Aniserowicz avatar
    3 posts
    Member since:
    Dec 2008

    Posted 12 Jan 2010 Link to this post

    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

  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 13 Jan 2010 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Maciej Aniserowicz
    Maciej Aniserowicz avatar
    3 posts
    Member since:
    Dec 2008

    Posted 13 Jan 2010 Link to this post

    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...

  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 13 Jan 2010 Link to this post

    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.
Back to Top