Announcement

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

    override to filterData is not working.

    We had override filterData method to write some custom code before filter happens, i.e, when filter happens in the grid we need to clear the preview pane, It was working fine but after we have changed library in March, its not working.

    Infact, when clicking on filter button of filter editor of listgrid, fetchdata is invoked directly but I can not override fetchData as I don't know from where and when it is invoked.

    I read other posts having same issue but you have asked them to use dataFetchMode for getting data from server everytime but I have some other tasks like I mentioned before. Moreover, I am using dataProperties :{ fetchMode: "paged"} and after a while it stops going to server, actually when it has less records then dataPageSize, it stops going to server. I remember, it was also working fine some time back.

    Please let me know how do I implement custom code before I perform filter.

    Thanks,
    Ashish Chugh.

    #2
    Start by explaining what your custom code needs to do, then we'll recommend the right API. An override to either filterData or fetchData() may be inappropriate.

    About not going to the server, read the docs for ListGrid.fetchData().

    Comment


      #3
      I have a mail grid and below that in the same page I have tabset with 6 panes having related data to the records selected in main grid. Before I call filter I need to clear all listgrids in the subtab. I did it by overriding filterdata, writing my code to clear panes and then calling fetchData by passing criteria of filterData. It wokred fine for me.

      I can not write the same thing in callback either as call to fetchData in automatically done by filter button at right corner of Filter Editor.

      Please suggest how to do it.

      Also, it used to work before and it's not working now. I beleive all library changes should be backward compatible. One can not change application code everytime they change library.

      Thanks,
      Ashish Chugh.

      Comment


        #4
        Overriding a method that is not designated as a recommended override point is not guaranteed for backward compatibility (in basically any software platform).

        Use dataArrived to clear your related components. This also gives you an opportunity to not clear them when it's not necessary.

        Comment


          #5
          Other than this there is another issue that dataFetchMode only works in records are more than mentioned in dataPageSize (I have given 50) in listgrid. If my first search gives in 5 records and I change the criteria, it do not go to the server and try to find the records in client only.

          Comment


            #6
            Once again, read the docs for ListGrid.fetchData().

            Comment


              #7
              Read. though I am working on your library from past one and half years, I usually go thright the docs first. When I click on filter button in filter editor where do I write invalidateCache() and infact even if the criteria can not be satisfied on client, its not going to server.

              Comment


                #8
                Make sure you've read not just the docs for fetchData(), but the docs that the fetchData() documentation links to - those go on to describe a variety of override points and settings that can be applied to get whatever behavior you want.

                If you are still stumped after reviewing this documentation, please try explaining again what you are trying to do, in detail.

                Comment

                Working...
                X