1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    2
    Vote Rating
    0
    djitendranath is on a distinguished road

      0  

    Default Unanswered: Implementing sort on the whole collection for a paginated grid

    Unanswered: Implementing sort on the whole collection for a paginated grid


    The Grid that I have implemented has pagination. On click of the 'next' button it goes and fetches the next 100 rows. The sort on the Grid is only on each displayed page, when the user clicks the column header.
    Is there a way to implement both pagination where I load 100 rows at a time but when the user clicks the column header the whole collection of let's say 900 rows is sorted by that particular column header and the first 100 from that sorted collection is displayed?

    I am using com.extjs.gxt.ui.client.widget.grid.Grid and com.extjs.gxt.ui.client.store.ListStore

  2. #2
    Sencha User
    Join Date
    Dec 2012
    Posts
    2
    Vote Rating
    0
    djitendranath is on a distinguished road

      0  

    Default Implementing sort on the whole collection for a paginated grid

    Implementing sort on the whole collection for a paginated grid


    The Grid that I have implemented has pagination. On click of the 'next' button it goes and fetches the next 100 rows. The sort on the Grid is only on each displayed page, when the user clicks the column header.
    Is there a way to implement both pagination where I load 100 rows at a time but when the user clicks the column header the whole collection of let's say 900 rows is sorted by that particular column header and the first 100 from that sorted collection is displayed?

    I am using com.extjs.gxt.ui.client.widget.grid.Grid and com.extjs.gxt.ui.client.store.ListStore

    Any help or direction is much appreciated.

  3. #3
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Answers
    109
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Merged the two threads - please don't post the exact same thing in several places. The forums aren't just helpful for you learning to use GXT when you ask, they are also handy for people reading past questions, and getting the complete answer in one place to the one question.

    When loading from a remote data source (the server), how can the client be able to sort the whole list? It only has your page size (100) on the client at a time. It is the server's job, with all rows (900 in this example) to only send the rows that make sense.

    The load config should have data about what page was requested (what offset, how many items), as well was what sort (which column, which direction). It may also have filter information, if you have configured it to. Specify the correct loader to do the work you need.

    The server then should read those values out and fetch data accordingly. If you are using SQL, for example, the sort data should go into the ORDER BY clause - then the database will actually give you only what you ask for, in the order it should be in for the sort.

    GXT doesn't provide for this feature - it is up to how you are getting the data. If GXT specified exactly how you should store data, we could do this, but that would require GXT being not only widgets, but web server, database, etc. There are many databases and many servers, each with different features and downsides - you should pick the ones that fit the project you are working on.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi