Announcement

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

    Filtering empty/blank values in grid column filter

    Hi isomorphic,
    I am using grid filters.
    I want to filter all empty/blank values. Is it possible to do that.

    #2
    Hi Isomorphic,

    We are still waiting for the reply.May you please look into it and reply ASAP.

    Comment


      #3
      Please see the FAQ for the information you need to include when posting. You are missing all the basics (product and version, browser, etc), and, your post is very vague. It's not clear what a "grid column filter" is - the FilterEditor maybe? Nor is it clear when/how you want to filter out empty values, for what column type, with what type of UI.

      Comment


        #4
        Hi Isomorphic Team,
        We are using the ismorphic version is: 6.1-p20170930
        Our application is using SmartGWT + Spring + Hibernate.


        We are using Google chrome browser latest version.

        Yes, we are using the FilterEditor. We want to filter out empty values for String column type.

        Like, in the ComboboxItem text input field we are using which can show a list of options via a drop-down PickList. In that picklist, i want if user selects an empty value from that picklist dropdown, then all the empty/blank records should get filtered.


        For UI, we are using ViewListGrid and we are having a ListGridField on which we want to apply the filter.


        For the reference, i am sharing the lines of code below->

        ListGridField hdwAttributeType = new ListGridField(HardwareAttributesViewHelper.HARDWARE_ATTR_TYPE,
        HARDWARE_ATTRIBUTE_VIEW_MESSAGE.attribute_type());
        hdwAttributeType.setShowHover(true);
        hdwAttributeType.setSortByDisplayField(false);
        HardwareAttributesViewHelper.getFilterDropdownForAttributeTypeClass(hdwAttributeType);




        public static void getFilterDropdownForAttributeTypeClass(ListGridField attrTypeField) {
        ComboBoxItem filterSelectItem = new ComboBoxItem();
        DataSource hdwAttrTypeDS = DataSource.get(ClientConstants.HARDWARE_ATTR_TYPE_DS);
        filterSelectItem.setSortField(DESCRIPTION);
        filterSelectItem.setDisplayField(DESCRIPTION);
        filterSelectItem.setValueField(DESCRIPTION);
        filterSelectItem.setOptionDataSource(hdwAttrTypeDS);
        attrTypeField.setFilterOperator(OperatorId.EQUALS);
        filterSelectItem.setAutoFetchData(false);
        filterSelectItem.setAddUnknownValues(false);
        attrTypeField.setFilterEditorProperties(filterSelectItem);
        }


        Looking forward to your help on this issue.
        Thanks.

        Comment


          #5
          Use the ComboBoxItem.specialValues feature to show an extra item in the pickList, with a description such as "[Show Blank Entries Only]". The stored value in the specialValues valueMap should be some arbitrary string that a user would never enter (eg "*_special_blank_value_criteria_*"). Use setPickListFilterCriteriaFunction() to make it so that when this item is selected, the criteria that is used selects blank values, as this will not normally happen in a ComboBox (eg, when the field is empty, that normally means all values should match).

          Comment

          Working...
          X