1. #221
    Sencha Premium Member teddyjas's Avatar
    Join Date
    Dec 2007
    Location
    Singapore
    Posts
    262
    Vote Rating
    0
    teddyjas is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    Call:
    Code:
    store.applyPaging();
    store.fireEvent('datachanged', store);
    thanks condor,

    I've tried that but i still have some issue.
    I have 11 records, paging is set 10 records per page.
    so on page 1 I have records 1-10 and page 2 I have 1 records.

    the store's allData contains 11 records
    Code:
    ds.removeAt(0);
    ds.applyPaging();
    ds.fireEvent('datachanged', ds);
    when I execute the code above to remove one of the record, not only that record is deleted, but also the last record on page 2.
    so now the store's allData contains 9 records...

    I'm still checking why is that so...?

  2. #222
    Sencha Premium Member teddyjas's Avatar
    Join Date
    Dec 2007
    Location
    Singapore
    Posts
    262
    Vote Rating
    0
    teddyjas is on a distinguished road

      0  

    Default


    in pagingstore's applyPaging function:
    Code:
                var allData = this.data,
                    data = new Ext.util.MixedCollection(allData.allowFunctions, allData.getKey)
    if I change that to:
    Code:
                var allData = (!this.allData) ? this.data : this.allData,
                    data = new Ext.util.MixedCollection(allData.allowFunctions, allData.getKey)
    that seems to solve the issue, but I havent test on more records yet.

    Condor, do you think is the issue?

  3. #223
    Sencha User
    Join Date
    Mar 2010
    Location
    India
    Posts
    10
    Vote Rating
    0
    Arindam Das is on a distinguished road

      0  

    Question


    Quote Originally Posted by Condor View Post
    2. You would have to write some extra code for that.
    - Detect if a load needs data that hasn't been loaded yet.
    - Load the extra data using an Ajax request and create records from it using the reader.
    - Join the records to the store and add them to allData.
    - Apply paging and fire a datachanged event.
    Condor,
    Is this already done in another component? If not do you mean to say that I write the above extra code modifying your paging store or should I start fresh by extending the Store itself.

    Thanks for the great work

  4. #224
    Ext JS Premium Member kent78's Avatar
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    19
    Vote Rating
    0
    kent78 is on a distinguished road

      0  

    Question Changing page-size

    Changing page-size


    Hi.

    I´m trying to make it possible for the user to change the pagesize by clicking a series of buttons.
    (To show 10 or 100 rows at a time).

    Can anyone help with a solution that makes it possible to change the grids pagesize without
    fetching the data over again with this component. I've tried:

    Code:
    pagingToolbar.pageSize = 10;
    pagingToolbar.doRefresh();
    Seems that doRefresh create a new request to the server (fetches the data all over again).

    All the data that I´m interested in is allready present in the PagingStore.
    So this would be a good feature and would keep the number of requests down on the server side.

    Any hints would be appreciated. Thx!

  5. #225
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Changing the pageSize should force a new server request. Are you sure that is the only thing you are changing?

  6. #226
    Ext JS Premium Member kent78's Avatar
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    19
    Vote Rating
    0
    kent78 is on a distinguished road

      0  

    Smile


    The code below seems to do what I needed. IE. changing the number of rows shown per page without any new server requests.

    Code:
    function btnClicked (numberOf){
        var theStore = Ext.StoreMgr.lookup('paging-grid-store');
        theStore.load({params: {start: 0, limit: numberOf}});
    };
    var HundredBtnClickHandler      = function (){ btnClicked(100); };
    var TwentyFiveBtnClickHandler  = function (){ btnClicked(25); };
    var TenBtnClickHandler            = function (){ btnClicked(10); };

  7. #227
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Yes, but you still need to update the pagingstore pageSize, because clicking on the next or previous button would show the wrong number of records.

  8. #228
    Ext JS Premium Member kent78's Avatar
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    19
    Vote Rating
    0
    kent78 is on a distinguished road

      0  

    Default


    True. I just noticed that myself and was about to edit my last post. Thanks.

  9. #229
    Ext JS Premium Member kent78's Avatar
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    19
    Vote Rating
    0
    kent78 is on a distinguished road

      0  

    Smile


    Here is the code, just for reference:
    Code:
    function btnClicked (numberOf){
        var pagingToolbar = Ext.getCmp('local-gridpanel-pagtbar'),
            theStore = Ext.StoreMgr.lookup('paging-grid-store');
        if(numberOf === -1){ numberOf = theStore.getTotalCount(); }
        pagingToolbar.pageSize = numberOf;
        theStore.load({params: {start: 0, limit: numberOf}});
    };
    var TwentyFiveBtnClickHandler = function (){ btnClicked(25);  };
    var TenBtnClickHandler        = function (){ btnClicked(10);  };
    var AllBtnClickHandler        = function (){ btnClicked(-1);  };

  10. #230
    Ext User
    Join Date
    Jan 2011
    Posts
    2
    Vote Rating
    0
    MarceloCajr is on a distinguished road

      0  

    Default


    Condor... Sorry about my question but i don't understand how to implement the Paging method...
    Look my Logic
    1 - Get the remoteData...
    2 - Mount a LocalData with remote data
    3 - use the local data to generate de grid.
    4 - Do pagination and filter.

    What i'm trying to do to get remote data is:

    var store = new Ext.ux.data.PagingArrayStore({
    fields: [...],
    url: 'resultarea.action',
    autoLoad: {params: {start: 0, limit: 10}}
    });

    Its correct?

    Tks for all help

Thread Participants: 105

  1. Animal (3 Posts)
  2. galdaka (2 Posts)
  3. cgi-bin (4 Posts)
  4. tchitani (4 Posts)
  5. tobiu (1 Post)
  6. steffenk (1 Post)
  7. renaudham (1 Post)
  8. markpele (1 Post)
  9. Sesshomurai (1 Post)
  10. teddyjas (5 Posts)
  11. buergi (2 Posts)
  12. Buzzwords (2 Posts)
  13. tomcheng76 (4 Posts)
  14. kveeiv (1 Post)
  15. dhisnotnull (2 Posts)
  16. walldorff (1 Post)
  17. brizardh (2 Posts)
  18. elizard (1 Post)
  19. Remy (1 Post)
  20. renoye (8 Posts)
  21. despay (1 Post)
  22. lwexler (2 Posts)
  23. tomim (1 Post)
  24. Mjollnir26 (1 Post)
  25. allenlako (3 Posts)
  26. Andrea Gioia (1 Post)
  27. wp.joju (1 Post)
  28. genio (2 Posts)
  29. 828 (1 Post)
  30. ljschrenk (4 Posts)
  31. diablo (3 Posts)
  32. blakel (1 Post)
  33. Grolubao (2 Posts)
  34. makiavelli (2 Posts)
  35. elesel (1 Post)
  36. Capt.JackSparrow (2 Posts)
  37. ferryman (3 Posts)
  38. cwford (1 Post)
  39. 3dm (1 Post)
  40. imnilesh (1 Post)
  41. Rotterdam (2 Posts)
  42. nandubochkar (1 Post)
  43. Dustin Graham (1 Post)
  44. Boing (2 Posts)
  45. tdteti_ (8 Posts)
  46. vtulin (2 Posts)
  47. hello (1 Post)
  48. PranKe01 (2 Posts)
  49. jbusuulwa (6 Posts)
  50. cwilson (1 Post)
  51. ronaldploeger (1 Post)
  52. scblue (1 Post)
  53. saadkhan (2 Posts)
  54. subbugv (6 Posts)
  55. p3p3 (1 Post)
  56. computeraholic (1 Post)
  57. calabacita (3 Posts)
  58. aghextjs (1 Post)
  59. Arindam Das (1 Post)
  60. aw_zahid (1 Post)
  61. deister (1 Post)
  62. billprince (1 Post)
  63. amol.gaikwad (2 Posts)
  64. george4rotech (7 Posts)
  65. leonrenkema (1 Post)
  66. mvassau (1 Post)
  67. aDoF96 (2 Posts)
  68. attack11 (3 Posts)
  69. chakrics (1 Post)
  70. thangamalar (3 Posts)
  71. mayurid (1 Post)
  72. Lobo (1 Post)
  73. christian130 (3 Posts)
  74. elbino (3 Posts)
  75. eashwaranp (1 Post)
  76. atul.sachan@capgemini.com (3 Posts)
  77. Joe Kuan (1 Post)
  78. kent78 (4 Posts)
  79. dsk1962 (1 Post)
  80. Woodlander (3 Posts)
  81. msmolyak (1 Post)
  82. mond (4 Posts)
  83. anandhasubha (1 Post)
  84. David Warren (1 Post)
  85. colinm (2 Posts)
  86. sothea (1 Post)
  87. incanus (1 Post)
  88. MarceloCajr (1 Post)
  89. knackwurst (1 Post)
  90. Pattie (1 Post)
  91. parnold3 (1 Post)
  92. StanimirPanchev (1 Post)
  93. palashkumar1010 (1 Post)
  94. ash4aque (3 Posts)
  95. farfar (3 Posts)
  96. PrashanthShetty (1 Post)
  97. brprashanth (2 Posts)
  98. perseusy (3 Posts)
  99. theWalli (1 Post)
  100. hieu79vn (1 Post)
  101. Hisamitsu (1 Post)
  102. hensor (1 Post)
  103. northmh (3 Posts)
  104. parax (1 Post)
  105. PankajG (1 Post)

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar