Ticket T323002
Visible to All Users

How can I use OptionsFilter.FilterPopupMode = FilterPopupMode.CheckedList and keep the Custom option in the filterlist

created 9 years ago (modified 9 years ago)

I cannot choose my version of the XtraGrid suite in the combobox on this ticket form.
I have version 15.2.3.0 of the XtraGrid suite.

My users all want the filter on the gridview to be a checkedlist.
This i have done like this :

C#
ColumnView view = (ColumnView)gridControl1.ViewCollection[0]; foreach (GridColumn col in view.Columns) { col.OptionsFilter.FilterPopupMode = FilterPopupMode.CheckedList; }

This works, but has a bug.
In the filterpopup the option "Custom" is gone, it only shows "Select All".
I have done a livechat with someone from devexpress and he said that I should make a ticket for this because this is probably a bug.

So my question is, how can I setup checkedlist for columns and also keep the Custom option.
Its seems so logical to me and to all users here that I cannot understand why the custom option is gone ?

I have attached an image, what we need is the checked list filter on the right of the image, but the (custom) option in the left side of the image should also be available on the right side, so the user can choose how to filter and is not restricted in any way.

Answers approved by DevExpress Support

created 9 years ago

Hi,

As stated in the Filter Dropdown List help article, the Custom Filter Dialog is not supported for a checked filter drop-down list. Unlike a regular column filter drop-down list, a checked filter drop-down list allows you to select multiple values. Thus, a filter criterion generated by selecting multiple values in this drop-down list cannot be passed to the Custom Filter Dialog. If you filter data by selecting a value in a regular filter drop-down list and then invoke the Custom Filter Dialog, the latter will show this filter criterion.

If you wish to create complex filter criteria, it is possible to do this by using the Filter Editor. It can be invoked by right-clicking a column header.

Let me know if the use of the Filter Editor is acceptable.

P.S. Version 15.2.3 is disabled. That is why you cannot choose it. Recently, we have released a new minor update 15.2.4.

    Show previous comments (4)
    DevExpress Support Team 9 years ago

      Hi,

      As I said in my original answer, "a filter criterion generated by selecting multiple values in this drop-down list cannot be passed to the Custom Filter Dialog.". As you can see, the Custom Filter Dialog allows you to create two filter conditions by using the limited set of filter operators. That is why when you select more than two filter values, nothing is shown in this dialog. As a solution, I suggest that you clear the current column filter string before showing the Custom Filter Dialog. I have created a project to show how to do this. I would like to note that in my project, the Filter Panel shown at the bottom displays either a filter criterion from the Custom Filter Dialog or a filter criterion built by using the checked filter drop-down list. Would you please clarify how to see the issue when both criteria are shown?

      I look forward to your response.

        I will look at your project, it sounds exactly like what i want. Either multiple selected values, OR a custom filter.
        To clarify, in my current testproject build with the code you send me before, it seems to work like this but it showed both filters. The showing of both filters was my issue with your solution, if I can clear the current column filter before invoking the custom filter than the issue could be solved.
        I let you know after I tried your project.

        DevExpress Support Team 9 years ago

          OK. I look forward to your results.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.