Announcement

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

    setFilterOnKeyPress working intermittently

    Hi ,
    I created a grid with the below properties :
    Code:
     listGrid.setDataFetchMode(FetchMode.BASIC);
            listGrid.setFilterEditorHeight(ComponentStyle.INT_24);
            listGrid.setShowFilterEditor(true);
            listGrid.setFilterOnKeypress(true);
    This is a SQL datasource bound grid. When I enter the data first time it sends the server call and gets the data but subsequent attempt fails. This is intermittent.
    I've tried other fetch modes but still same. No fetch call is fired while changing data in filters.

    Kindly suggest.
    Thanks in advance

    #2
    See the docs for fetchData() - it's normal for filtering to take place on the client after a full cache is obtained for a given criteria, and then the criteria becomes more restrictive.

    By the way, we really like your constant ComponentStyle.INT_24.

    Comment


      #3
      Thanks Isomorphic, The client side filtering is not working. For ex : If I enter one value in filter it gets the data from server but as soon as i enter the new data in same filter there is no server call and no client side filtering. I just recognized that I am facing this issue when I have setFetchOperation("myFetchOperation") on grid. If I remove this and let the default fetch work , everything works fine. Do I need to define this operation somewhere else for this to work?
      Last edited by preeti_kanyal; 13 May 2020, 00:21.

      Comment


        #4
        You can break client-side filtering if you return data that doesn't have values for the fields that criteria apply to. However, normally this results in no records matching on the client when client-side filtering kicks in.

        You haven't clarified what goes wrong - please try to be more clear.

        Note that the "ResultSet" log category can also show you how the framework is making decisions between client- and server-side filtering, and what happens when filtering is applied.

        Comment


          #5
          Isomorphic my fetch operation is :
          Code:
                  <operationBinding operationType="fetch" operationId="myFetch" outputs="id,name,address"/>
          name and address can be part of criteria.
          The resultset logs are showing correct flow as expected but it fails to filter and shows "No item to show". If I just remove this binding and use default fetch. Everything works fine.

          Comment


            #6
            Right, like we said,

            You can break client-side filtering if you return data that doesn't have values for the fields that criteria apply to. However, normally this results in no records matching on the client when client-side filtering kicks in.
            If you have criteria applied to some field which is never sent to the browser then client-side filtering cannot work on that field.

            Comment

            Working...
            X