Announcement

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

    How to implement "Previous" and "Next" in list grid

    Hello,

    I have an requirement where I need to load records from server (paginated) based button clicks. So it's like Previous and Next buttons and when user clicks on Next we load older records and Previous returns newer records from server. Right now My list grid is paginated and it autofetch data from server based on startRow/endRow and totalRows returned by server. It with standard SM way where user pulls scroll and data is loaded. Now we also need to show buttons to achieve the same behaviour like scroll. Please advise how we can do that, obviously if previously data was loaded then clicking on Previous should not go to server and show data from cached data. If reached at the top of rows (startRow=0 and endRow=25) then I expected to make a server call to get new records if available.

    Mahesh.

    #2
    We strongly recommend against this because it is worse in basically every way, makes certain features either impossible or very awkward for end users, and requires extra effort to implement.

    In most cases when a designer or end user requests this, they are either not aware that paging-while-scrolling is available, or they have never seen a paging-while-scrolling system that actually works well.

    This thread provides some more background on the serious disadvantages of paging via buttons:

    http://forums.isomorphic.com/showthread.php?t=3103

    Comment


      #3
      I need to Implement the Pagination on server side so team please let me know the same how can i implement the same .

      Comment


        #4
        ??

        Buttons or scrolling, the pagination works by sending requests to the server.

        Start by reading the QuickStart Guide, focusing especially on the Data Integration and Server Framework chapters.

        Comment


          #5
          I am looking for button implementation. There will pagination buttons at the downside of listgrid. I am attaching image here


          On clicking I need to implement custom filter as well. i.e. choosing some filter fields it makes some criteria on basis of selected field, a server call should be made and fetch data from server and render through smartgwt grid.
          Attached Files

          Comment


            #6
            Hi Team , Please respond.

            Comment


              #7
              We did.

              When we said "Buttons or scrolling, the pagination works by sending requests to the server.", to clarify, this means: *regardless* of whether you are using Buttons or scrolling, the pagination works by sending requests to the server.

              So regardless of whether you're using Buttons or scrolling, next step is to read the referenced docs.

              Just a reminder: we consider button-based scrolling worse in every way, it makes several features either unimplementable or awkward for end users, and it will require extra effort. We strongly recommend against it.

              Comment


                #8
                When we scroll the list of data with scroll , it will hit on server right?

                Comment


                  #9
                  This forum is intended to answer questions not answered in the docs.

                  Please do not expect responses if you continue to ask questions that are well covered in the documentation.

                  Comment


                    #10
                    Any way I implemented my own "Newer" and "Older" logic along with 'autoFetchData" using scrolls. Created a custom component for it and it's working as I needed.

                    Comment


                      #11
                      Hi argopm .... can you share your code if it is possible? if you have done pagination at server side....

                      Comment


                        #12
                        Hello Arpita,

                        I indeed implemented server side pagination but just the way smartclient recommend by returning `totalRows, startRow and endRow` in response. My requirement was to allow user to go back and forward via "Newer" and "Older" button and at the same time have SmartClient feature of auto loading on Scroll. But When loading "Older" records requirement was also to fetch data from server if scroll wasn't used to load those records. Advantage of this is that once data is loaded and if user is just playing between "Newer" and "Older" button data won't be reloaded.

                        Is that something you want, I can share?

                        Mahesh.

                        Comment


                          #13
                          Hello argopm,

                          I need this type of implementation in my project. Can you please share with me this implementation?

                          Preeti

                          Comment

                          Working...
                          X