Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Multiple selection in FilterEditor dropdown for ListGrid

    Hi,

    Is there a way to allow multiple selection for dropdown in FilterEditor?

    We have a "Status" column in a ListGrid with possible values "PROCESSING, COMPLETE, FAILED, READY/PAYMENT, ". Our requirement is to allow the user to filter on more than one status at a time.

    I can do this in code and the multiple values appear as comma separated.
    Code:
    final Criteria filterEditorCriteria = new Criteria();
    filterEditorCriteria.addCriteria("status", "COMPLETE");
    filterEditorCriteria.addCriteria("status", "PROCESSING");
                    
    elfGrid.setFilterEditorCriteria(filterEditorCriteria);
                    
    elfGrid.filterByEditor();
    Can someone please let me know if I can get the dropdown in FilterEditor to allow multiple selection to achieve this?

    Thanks.

    SmartGWT version = 2.2
    Browser = Firefox 3.6.10 and IE 6

    #2
    Upgrade to 2.4, then use setFilterEditorType() to enable multiple:true - you'll see a dropdown with checkboxes for selection multiple items for filtering.

    Comment


      #3
      How to set some value in the grid box if multiple options selected?

      How to set some value in the grid box if multiple options selected?

      Currently it displays all the selected options and hard to read, is there anyway we can override that and set some value like **MULTIPLE**?

      SC Version=8.2

      Comment


        #4
        First, you need to update your SmartGWT version, as you are waaaay out of date. You should at least go to 5.0, but consider working with 5.1d now if your release is still months away.

        Then, you can add a ValueFormatter to your filterEditorType that detects that the current value is a 2+ entry Array and return a special string ("MULTIPLE") in this case.

        Comment

        Working...
        X