1. #21
    Sencha Premium Member
    Join Date
    May 2008
    Posts
    24
    Vote Rating
    0
    renoye is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    loadData will fire a load event without start and limit parameters, making the PagingToolbar think it is on the first page.

    Instead of loadData try:
    Code:
    var r = store.reader.readRecords(data);
    store.loadRecords(r, Ext.apply({}, store.lastOptions), true);
    thanks, this works fine.

    here are the other problem that I came across.

    I am using the newest PagingStore v0.4 and gridFilter 0.2.8. I have problems on the paging toolbar.

    Three problems I've noticed after I did filtering:
    1. Page count always keeps the same as well as total records count on the paging toolbar.
    2. Store shows current empty page instead of navigating to 1st page (if I filter 1 record for example)
    3. if a grid already have filters, pagingstores will display all records then immediately do filtering and display filtered records. so it displays twice and causes some flickering.

    I looked code
    filterby and clearfilter only fires datachange event. Should it also fire 'load' event to trigger the page toolbar?
    And, loadRecords only do Sort not filter. Should it do both?

    Thanks for helping. waiting for your answers.

  2. #22
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    82
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    All the issues you found are not caused by the PagingStore, but are already part of Store.

    Try adding the changes you are suggesting (they sound ok)...

  3. #23
    Sencha Premium Member
    Join Date
    May 2008
    Posts
    24
    Vote Rating
    0
    renoye is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    loadData will fire a load event without start and limit parameters, making the PagingToolbar think it is on the first page.

    Instead of loadData try:
    Code:
    var r = store.reader.readRecords(data);
    store.loadRecords(r, Ext.apply({}, store.lastOptions), true);
    Quote Originally Posted by Condor View Post
    All the issues you found are not caused by the PagingStore, but are already part of Store.

    Try adding the changes you are suggesting (they sound ok)...
    hi, Condor, you are right. this is not the problem of pagingstore but the problem of store itself. I spent 1 hour to understand the code of store. it seems the creator intensionally seperate filtering from loadrecords. Do not know that is the same case in 2.2. However, I understand how pagingstore works much better. (trick is the allData)

    I tried to add fire load event within filterBy. That does not work. It cause recursive error.

    Finally, I found a solution. Proably, you won't like.

    use the grid to listen filterupdate event, then make the pagebar.doLoad(0)

    Ext.grid.GridPanel({
    ----
    ,listeners: {
    ---
    ,filterupdate: function() {
    that.bbar.doLoad(0);
    }
    });

  4. #24
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    82
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You might also be interested in this feature request.

  5. #25
    Sencha Premium Member
    Join Date
    May 2008
    Posts
    24
    Vote Rating
    0
    renoye is on a distinguished road

      0  

    Default


    condo:

    I have looked your feature request. I want to confirm one thing.

    If a store has a filter running already, now the store loads new data. After your change, the data store will run applyFilter twice. First in the loadRecords, second when filterBy being called. am i right?

    thanks

  6. #26
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    82
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    No, normally loadRecords wouldn't filter at all (no call to filterBy). I added the applyFilter call in there to filter the store before the bound components (grids etc.) are notified.

  7. #27
    Sencha Premium Member
    Join Date
    May 2008
    Posts
    24
    Vote Rating
    0
    renoye is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    No, normally loadRecords wouldn't filter at all (no call to filterBy). I added the applyFilter call in there to filter the store before the bound components (grids etc.) are notified.
    currently, loadRecords of store do not call filtering at all. So if a store has a filter after loadRecords, which object (is that Grid) triggered filterby function? and how can you avoid those trigger. thanks for answering my question in advanced.

  8. #28
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    82
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Do you use some kind of filter plugin that could cause this?

  9. #29
    Sencha Premium Member
    Join Date
    May 2008
    Posts
    24
    Vote Rating
    0
    renoye is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    Do you use some kind of filter plugin that could cause this?
    I am using Ext.ux.grid.GridFilters v0.2.8

    Let me ask my question again. I know store has a filter method. However, none of the methods of store are calling filter method inclunding loadRecords. So this filter method must be called by bounded object. Most likely the grid object.
    Am I right?

  10. #30
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    82
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    As I suspected, it's cause by the GridFilters plugin (try configuring it with onLoad:Ext.emptyFn).

Thread Participants: 106

  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)
  106. reedcat (1 Post)