Announcement

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

    Format filter editor

    Hi All

    GWT 2.1.0
    Smartgwt Pro 2.3
    Firefox 3.6.13

    I create one list grid and include filtering.
    Code:
      grid.setShowFilterEditor(true);
      grid.setFilterOnKeypress(true);
    I set to one field value map
    Code:
    ListGridField company = new ListGridField("company");
    company.setValueMap("value1","value2","value3");
    The data for filtering will be shown in a SelectItem. I like to show only my data in a filter editor (value1,value2,value3) without blank value in a selectItem field. I actually want to restrict filtering all data (blank value).

    Please help, how to do that?
    Attached Files
    Last edited by mikeloco1; 1 Mar 2011, 00:08.

    #2
    Use field.filterEditorType to set allowEmptyValue:false.

    Comment


      #3
      Thank for fast response

      Now it works fine.
      Actually I had another more problem,but it was resolved now. I define one SelectItem form and fill it with data source (ds). After that, I set filter editor type

      Code:
      SelectItem si = new SelectItem();
      si.setOptionDataSource(ds);
      si.setAllowEmptyValue(false);
      company.setFilterEditorType(si);
      First time it was shown correctly, but after I change selection, data from SelectItem was disappeared. I resolve it with next:

      Code:
      si.setAutoFetchData(false);
      Thanks again for advice
      Best regards

      Comment

      Working...
      X