Announcement

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

    SelectItem in filter row of ListGrid problem

    If in ListGrid SelectItem (which is attached to option data source) is used then when it shows up in filter row in ListGrid, option data source sends request without first and last record information inside. If it is shown in edit mode of ListGrid then it sends such information.

    Anybody knows what I am missing in setting up SelectItem?
    Thank you.
    BR//Marije

    #2
    I am still having trouble to make that SelectItem shown in Filter row of ListGrid to send start and end row to server side when it is bound to OptionDataSource.

    DSRequest object is missing getStartRow() and getEndRow() values.

    When SelectItem is shown in Editor mode of ListGrid then it works fine (I have this kind of values for start and row (0, 75).

    Any suggestions?

    Thanks,
    BR//Marije

    Comment


      #3
      The cause of the problem was that it is necessary to explicitly setallowemptyvalues to false of SelectItem which goes into filter row, besides it is by default set to that false value.

      I hope someone will find it useful.

      Comment


        #4
        Hi, I have the same problem, where can I find setallowemptyvalues method ?

        Comment


          #5
          Here is part of code where you can see this setting (selectItem.setAllowEmptyValue(false)):

          Code:
          ListGridField field = new ListGridField("Name", "Title");
          field.setDisplayField("gridDisplayFieldName");
          field.setValueField("valueFieldName");
          
          SelectItem selectItem = new SelectItem("Name");
          selectItem.setDisplayField("displayFieldName");
          selectItem.setValueField("valueFieldName");
          selectItem.setOptionDataSource(optionDataSource);
          selectItem.setAutoFetchData(false);
          
          field.setEditorType(selectItem);
          
          selectItem.setAllowEmptyValue(false);
          field.setFilterEditorType(selectItem);

          Comment

          Working...
          X