Announcement

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

  • ListGrid FilterEditor that doesn't show the criteria

    Hello,

    What is the best way not to show the criteria that was used in the first fetchData() call? We need to filter the data initially based on a column that is visible and can also be filtered on, but the user shouldn't see the original criteria. The user can further narrow down the data set using the column though. It was working for us in SmartGWT 5 where AdvancedCriteria was using an operator different from the default, but it doesn't seem to be the case in SmartGWT 6.

  • #2
    The new allowFilterOperators feature, on by default, means that criteria with an operator different from the default will now be shown to the user and can be edited. Turning that feature off would be the quickest fix, since the criteria would no longer be editable.

    As far as a fix that allows you to keep allowFilterOperators enabled, you could add a filterEditorSubmitHandler and introduce the criteria there, so that the FilterEditor as such doesn't track it.

    Comment


    • #3
      Hi abthere,

      I have a similar situation where I introduce the criteria in the operationBinding in my .ds.xml, so that the client never sees them (this is better anyway if you are realizing some security requirement).
      If not, you could also copy the field you are applying the criteria to with a customSelectExpression or nativeField in you .ds.xml and apply your initial ListGrid filtering on the new field (without showing that field).

      Best regards
      Blama

      Comment


      • #4
        You could also see the doc for implicitCriteria, which applies additional criteria that the user is never shown.

        Comment


        • #5
          Blama
          thank you for the suggestions.

          Comment


          • #6
            Isomorphic,

            DataBoundComponent.[FONT=Arial, Verdana, sans-serif]implicitCriteria turns out to be the easiest solution for us. Thank you![/FONT]

            Comment

            Working...
            X