Announcement

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

    Force clientSideOnly Filtering

    Hi,

    is it possible with SmartGwt to force client side only filtering ?

    I have a DataSource connected to the server, with the operations add/update/fetch.... bind to server-side operations (so I think I can't change it to clientOnly)

    My grid is connected to the DataSource

    When my page is drawn :
    => I fetch the Data
    => When I filter (with the filterEditor) another fetchData is called
    - I'd like to prevent that, all my record are returned to the client side the first time

    Is there a way to prevent the Grid to call the server for filtering data ?

    #2
    Yes, ListGrid. setDataFetchMode(local).

    Comment


      #3
      Hello,

      thanks for the rapid response. But I can't find the method setDataFetchMode()
      On the ListGrid or the DataSource

      Where can I find it ?

      Comment


        #4
        It appears it hasn't got an SGWT API yet, but setAttribute("dataFetchMode","local") will work.

        Comment


          #5
          Added ListGrid.setDataFetchMode(..) to SVN. See the sticky on how to get the latest build.

          Sanjiv

          Comment


            #6
            I'm trying the same thing with no luck. When I construct the grid I use setAutoFetchData(false) and setDataFetchMode(FetchMode.LOCAL). Then, based on a user action I load all of the data client-side and use setData() to attach it to the grid. I have a filter editor on the grid (a TreeGrid in my case) and yet, even with setDataFetchMode(FetchMode.LOCAL), using the filter editor results in a call to the server.

            Comment


              #7
              Hi Jay,

              Your problem is actually different - client-side filtering support for trees does not exist yet.

              Comment

              Working...
              X