Announcement

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

    Local grid filtering

    A lot of possibilities exist to configure the filter behaviour on grids.

    We have a datasource that is not clientOnly, but want the grid filtering to occur client side. Our grid filters 'onKeyPress', the 'autoFetch' is false.

    There are a lot of suggestions, but none of them seem to work for this case:

    In general, the client side filtering works (without any special properties set), but the first character entered in the filter editor causes a server data fetch, causing a complete refetch, not filtering any data. From the second character on, all goes well.

    We've tried:

    Code:
    theGrid.getResultSet().setUseClientFiltering(true);
    Code:
    dataSource.setAutoCacheAllData(true);
    and so on.

    What would be the best approach, is there a solution for this?

    Thanks,

    Sander

    #2
    You forgot to describe what you actually want to have happen.

    Comment


      #3
      We want the local data (that is already present due to a programatic fetchData()), to be filtered upon the first keystroke, not the second one.

      Also we don't want the auto fetch to occur upon filtering, all the data is already present...

      Thanks,

      Sander

      Comment


        #4
        This isn't making much sense. In general, grids filter as you type using the fetch operation on the DataSource they are provided. If you want to search a subset of the full dataset, use a clientOnly DataSource. If you want something else, try explaining it in much more detail.

        Comment


          #5
          hey,

          we`ve encountered this problem.
          We initially fetch data using a our own criteria and fetchOperation (not the regular fetch).

          When we display it in a listGrid, we want the filter to filter the client's data.

          We understand why you'd want to filter using a fetch, but we need a way to explicitly tell the listGrid that he has all the data it needs from the previous fetch.
          The same thing goes for Export to XLS - It reselects the data, instead of taking the data as it shows on the ListGrid.
          Each fetch is very slow, and it hurts the user experience.

          We can't create a clientOnly dataSource for this ListGrid, because we want to enable inserts, updates,exports and deletes based on the original DataSource.

          Thanks.

          Comment


            #6
            Creat a ResultSet, providing the data as allRows, then call setData with that ResultSet.

            Comment


              #7
              Hey,
              This is the obvious solution, but if I do it by default, I lose the paging abilities I get.

              I want the paging to work by default, and only when the whole data is needed (for filtering or exporting) it should fetch it all using allRows and do its operation.

              Any idea?

              Comment


                #8
                The ResultSet comes with documentation - see initialData and initialLength.

                Comment

                Working...
                X