1. #121
    Sencha User
    Join Date
    Nov 2007
    Location
    France
    Posts
    133
    Vote Rating
    0
    khatuido is on a distinguished road

      0  

    Question


    Nice code it works fine except when we try use it with an editor grid .

    There is a first problem in the method ensureVisible cos c is not defined so i add this. It's looks works.

    Code:
    ensureVisible : function(row, col, hscroll)
        {
            [...]
    
            if(hscroll !== false){
                /** AJOUT LIVEGRID */
                var g = this.grid;
    	    var c  = g.getGridEl();
    	    /* FIN AJOUT LIVEGRID **/
            [...]
    But i still got a problem when i bufferred the grid. It lost the modify and i cannot edit the last row. Someone use the livegrid with an editor grid?

  2. #122
    Sencha User
    Join Date
    Nov 2007
    Location
    France
    Posts
    133
    Vote Rating
    0
    khatuido is on a distinguished road

      0  

    Default


    in fact i got a problem when the scrollbar is down it put my edit row out of my grid and create an error.

  3. #123
    Ext User
    Join Date
    Feb 2008
    Posts
    5
    Vote Rating
    0
    False Maria is on a distinguished road

      0  

    Default Why is LiveGrid not sorting???

    Why is LiveGrid not sorting???


    Hi everyone,

    This is my first post, so forgive me if I forget to mention something.

    I am working on a web app which will be using ExtJS, mostly for the grid functionality. We ran into an issue when dealing with large amounts of data. The grid was taking too long, ever with paging, so we decided to go with the LiveGrid User Extension.

    The problem is this, even when I try and replicate the LiveGrid using hard-coded json in data-proxy.php, it won't sort *any* of the data. It shows the "Loading" screen briefly before coming back, unsorted.

    Here is the modified PHP from data-proxy.php
    PHP Code:
    <?php 

         
        $length 
    500
         
        
    $feeds = array('response' => array( 
            
    'value' => array() 
        ));          

                                             
        for (
    $i=1;$i<500;$i++) { 
            
            
    $feeds['response']['value']['items'][] = array( 
               
    'id'            => $i
               
    'number_field'  => rand(900,1000), 
               
    'string_field'  => rand(900,1000), 
               
    'date_field'    => rand(900,1000
            );   
        } 
         
        if (!isset(
    $feeds['response']['value']['items'])) { 
            
    $feeds['response']['value']['items'] = array(); 
        } 
         
        
    $feeds['response']['value']['total_count'] = $length;                                           
        
    $feeds['response']['value']['version']     = 1;                                           
         
    // +---------------------------------------------------------------------------- 
    // | You need to json_encode the array. If your PHP installation does not support 
    // | json_encode, go and get the Zend Framework at http://framework.zend.com, 
    // | which provides userland json encoding/decoding logic. 
    // +----------------------------------------------------------------------------     
        
    if (function_exists('json_encode')) { 
            
    $json json_encode($feeds); 
        } else { 
            require_once 
    'Zend/Json.php'
            
    $json Zend_Json::encode($feeds); 
        } 
          
        echo 
    $json;         
    ?>
    and here is my modified example.html

    HTML Code:
    <!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html>
    <head>
    
        <title>ExtJS (V2 RC1) live grid (user extension)</title>
    
        <!-- your usual ext stuff -->
        <script type="text/javascript" src="ext-2.0.1/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="ext-2.0.1/ext-all.js"></script>    
        <link rel="stylesheet" type="text/css" href="ext-2.0.1/resources/css/ext-all.css"/>
    
        <!-- needed files for the ux  -->
        <script type="text/javascript" src="ext-2.0.1/ux/widgets/grid/BufferedGridView.js"></script>    
        <script type="text/javascript" src="ext-2.0.1/ux/widgets/grid/BufferedRowSelectionModel.js"></script>    
        <script type="text/javascript" src="ext-2.0.1/ux/widgets/grid/BufferedStore.js"></script>    
        <script type="text/javascript" src="ext-2.0.1/ux/widgets/BufferedGridToolbar.js"></script>    
        <script type="text/javascript" src="ext-2.0.1/ux/data/BufferedJsonReader.js"></script>    
    
        
    </head>
    <body>
      
    
    <h1>Live Grid Example</h1>
    <p>This example shows how to create a grid representing a large amount of data without additional
    paging buttons.</p>
    <p>The grid sits in a Ext.Window to demonstrate the BufferedGridView's resize behavior.</p>
    <p></p>
    <p>Please report bugs and feature requests to Thorsten Suckow-Homberg &lt;<a href="mailto:ts@siteartwork.de">ts@siteartwork.de</a>&gt;</p>
    <p><a href="http://www.siteartwork.de">http://www.siteartwork.de</a></p>
    <p>Forum entry: <a href="http://extjs.com/forum/showthread.php?p=84902#post84902">http://extjs.com/forum/showthread.php?p=84902#post84902</a></p>
    <p>Blog entry: <a href="http://www.siteartwork.de/2007/11/10/livegrid-component-with-extjs/">http://www.siteartwork.de/2007/11/10/livegrid-component-with-extjs/</a></p>
    
    <p>Project home: <a href="http://www.siteartwork.de/livegrid">http://www.siteartwork.de/livegrid</a></p>
    <script type="text/javascript">
        
    
    
    
    Ext.onReady(function(){
    
    // +----------------------------------------------------------------------------
    // | How to use your new components...
    // +----------------------------------------------------------------------------    
        /**
         * BufferedJsonReader derives from Ext.data.JsonReader and allows to pass
         * a version value representing the current state of the underlying data 
         * repository.
         * Version handling on server side is totally up to the user. The version
         * property should change whenever a record gets added or deleted on the server
         * side, so the store can be notified of changes between the previous and current
         * request. If the store notices a version change, it will fire the version change
         * event. Speaking of data integrity: If there are any selections pending, 
         * the user can react to this event and cancel all pending selections. 
         */    
        var bufferedReader = new Ext.ux.data.BufferedJsonReader({
            root            : 'response.value.items',
            versionProperty : 'response.value.version',
            totalProperty   : 'response.value.total_count',
            id              : 'id'
          }, [ {
             name : 'number_field', sortType : 'int'
          },{
             name : 'string_field', sortType : 'string'
          },{
             name : 'date_field',   sortType : 'int'
        }]);
        
        /**
         * Set up your store. 
         * An instance of BufferedJsonReader is needed if you want to listen to 
         * <tt>versionchange</tt> events. 
         * Make sure you set the config option bufferSize high enough 
         * (something between 100 and 300  works good).  
         */
        var bufferedDataStore = new Ext.ux.grid.BufferedStore({
            autoLoad   : true,
            bufferSize : 300,
            reader     : bufferedReader,
            sortInfo   : {field: 'number_field', direction: 'ASC'},
            url        : 'data-proxy.php'
        });
    
        /**
         * Here is where the magic happens: BufferedGridView. The nearLimit
         * is a parameter for the predictive fetch algorithm within the view.
         * If your bufferSize is small, set this to a value around a third or a quarter 
         * of the store's bufferSize (e.g. a value of 25 for a bufferSize of 100;
         * a value of 100 for a bufferSize of 300).
         * The loadMask is optional but should be used to provide some visual feedback
         * for the user when the store buffers (the loadMask from the GridPanel 
         * will only be used for initial loading, sorting and reloading).
         */
        var bufferedView = new Ext.ux.grid.BufferedGridView({
                nearLimit      : 100,
                loadMask : {
                    msg : 'Please wait...'
        }});          
        
        /**
         * You can use an instance of BufferedGridToolbar for keeping track of the 
         * current scroll position. It also gives you a refresh button and a loading
         * image that gets activated when the store buffers.
         * ...Yeah, I pretty much stole this one from the PagingToolbar!
         */         
        var bufferedGridToolbar = new Ext.ux.BufferedGridToolbar({
            view        : bufferedView,
            displayInfo : true
        });
    
        /**
         * BufferedRowSelectionModel introduces a different selection model and a
         * new <tt>selectiondirty</tt> event. 
         * You can keep selections between <b>all</bb> ranges in the grid; records which
         * are currently in the buffer and are selected will be added to the selection 
         * model as usual. Rows representing records <b>not</b> loaded in the current 
         * buffer will be marked using a predictive index when selected. 
         * Selected rows will be successively read into the selection store 
         * upon scrolling through the view. However, if any records get added or removed,
         * and selection ranges are pending, the selectiondirty event will be triggered.
         * It is up to the user to either clear the pending selections or continue
         * with requesting the pending selection records from the data repository.
         * To put the whole matter in a nutshell: Selected rows which represent records 
         * <b>not</b> in the current data store will be identified by their assumed
         * index in the data repository, and <b>not</b> by their id property.
         * Events such as <tt>versionchange</tt> or <tt>selectiondirty</tt>
         * can help in telling if their positions in the data repository changed.
         */
        var bufferedSelectionModel = new Ext.ux.grid.BufferedRowSelectionModel();        
        
    
            
            
    // +----------------------------------------------------------------------------
    // | ... nothing fancy in here. The usual Ext setup process of the panel
    // | and the column model, totally independent of the above configuration
    // | options.
    // +----------------------------------------------------------------------------
        var colModel = new Ext.grid.ColumnModel([
            {header: "Number", align : 'left',   width: 160, sortable: true, dataIndex: 'number_field'},
            {header: "String", align : 'left',   width: 160, sortable: true, dataIndex: 'string_field'},
            {header: "Date",   align : 'right',  width: 160, sortable: true, dataIndex: 'date_field'}
        ]);
    
    
        var grid = new Ext.grid.GridPanel({
            ds             : bufferedDataStore,
            enableDragDrop : false,
            cm             : colModel,
            sm             : bufferedSelectionModel,
            loadMask       : {
                msg : 'Loading...'
            },
            view           : bufferedView,
            title          : 'Large table',
            bbar           : bufferedGridToolbar
        });
        
        var w = new Ext.Window({
            title       : 'Ext.ux.grid.BufferedGridView V0.1',
            maximizable : true,
            resizable   : true,
            layout      : 'fit',
            items       : [grid],
            height      : 400,
            width       : 500
        });
        
        w.show();
            
    }); 
         
    
    </script>    
        
    </body>
    </html>

  4. #124
    Ext User
    Join Date
    Jan 2008
    Posts
    22
    Vote Rating
    0
    Sultanalifezar is on a distinguished road

      0  

    Default


    The reason is that the grid doesn't sort, it expects you to sort it, it sends the dataindex of the store and a sort direction to your php as parameters

    sort=number_field&dir=ASC

    So you need to handle it in your php

    Hope that helps

  5. #125
    Ext User
    Join Date
    Mar 2008
    Posts
    2
    Vote Rating
    0
    Emt is on a distinguished road

      0  

    Smile Emt

    Emt


    Excellent work. Can I use this component for loading data from XML Dom instead of hitting Database every time.

  6. #126
    Ext User efattal's Avatar
    Join Date
    Dec 2007
    Posts
    21
    Vote Rating
    0
    efattal is on a distinguished road

      0  

    Question Livegrid with Ext 2.0.2

    Livegrid with Ext 2.0.2


    Hi guys,

    Did anyone manage to make Livegrid work with Ext 2.0.2?

    Thanks for you help.

  7. #127
    Sencha User
    Join Date
    Jun 2007
    Posts
    258
    Vote Rating
    4
    hallikpapa is on a distinguished road

      0  

    Default


    very nice. I am using the GroupingStore and GroupingView for my grids datastore, and the ux filters plugin, etc, so I can filter, and group columns together. I wonder if there is a way to combine all these together. I am looking at the code now, but wondered if anyone else has tried to accomplish this.

    From the looks of it, it seems I can use the filter and livegrid together, but give up the grouping view, but I may be wrong.

  8. #128
    Sencha User ThorstenSuckow's Avatar
    Join Date
    Sep 2007
    Location
    Aachen, Germany
    Posts
    595
    Vote Rating
    2
    ThorstenSuckow is on a distinguished road

      0  

    Default


    I have updated the code so it works with Ext 2.0.2 (haven't tested with 2.0.1, though).

    Regards

    Thorsten

  9. #129
    Sencha User
    Join Date
    Jun 2007
    Posts
    33
    Vote Rating
    0
    gtaylor is on a distinguished road

      0  

    Default What did you have to change?

    What did you have to change?


    For our education, what did you have to change to get Livegrid to work with 2.02?
    Thanks for addressing the issue.

  10. #130
    Sencha User ThorstenSuckow's Avatar
    Join Date
    Sep 2007
    Location
    Aachen, Germany
    Posts
    595
    Vote Rating
    2
    ThorstenSuckow is on a distinguished road

      0  

    Default


    I have changed the getRows-method in BufferedGridView - it checks wether the return parameter of ensureVisible is null (seems like Ext.Element.setXY assumes it is all the time set). There was also a bug in ensureVisible where the row-index to scroll to may have been lees than 0.

Thread Participants: 248

  1. JeffHowden (1 Post)
  2. Animal (4 Posts)
  3. rodiniz (1 Post)
  4. galdaka (2 Posts)
  5. mdissel (1 Post)
  6. Wolfgang (1 Post)
  7. zzo (2 Posts)
  8. Frank (1 Post)
  9. herve (2 Posts)
  10. ericd (2 Posts)
  11. RWaters (5 Posts)
  12. Digital God (1 Post)
  13. Dumbledore (11 Posts)
  14. KimH (1 Post)
  15. pjordan (1 Post)
  16. cpantel (1 Post)
  17. mystix (3 Posts)
  18. wanclark (1 Post)
  19. MD (3 Posts)
  20. drew (1 Post)
  21. jheid (15 Posts)
  22. tsprague (1 Post)
  23. Confused (2 Posts)
  24. thesilentman (1 Post)
  25. andreas.linde (1 Post)
  26. violinista (1 Post)
  27. redxiii (1 Post)
  28. akannu (1 Post)
  29. theo (1 Post)
  30. Troy Wolf (3 Posts)
  31. chh (4 Posts)
  32. Phenothiasine (1 Post)
  33. danh2000 (1 Post)
  34. tobiu (1 Post)
  35. badgerd (1 Post)
  36. mlarese (1 Post)
  37. pluesch0r (1 Post)
  38. krycek (1 Post)
  39. gtaylor (4 Posts)
  40. ftftft (1 Post)
  41. hallikpapa (7 Posts)
  42. tech-nova (1 Post)
  43. provagino (1 Post)
  44. mjlecomte (2 Posts)
  45. iancmcc (1 Post)
  46. andrei.neculau (7 Posts)
  47. zieli1 (1 Post)
  48. meteorbites (1 Post)
  49. brookd (3 Posts)
  50. alexpetri (1 Post)
  51. urskipfer (1 Post)
  52. JEBriggs (1 Post)
  53. magunes117 (6 Posts)
  54. shiweiwei97 (3 Posts)
  55. vpell (1 Post)
  56. gelleneu (4 Posts)
  57. ohhowihateie (2 Posts)
  58. Andrewd2 (1 Post)
  59. Jacob (1 Post)
  60. cherbert (2 Posts)
  61. DragonFist (1 Post)
  62. marcoas (1 Post)
  63. Shmoo (1 Post)
  64. GraemeBryce (1 Post)
  65. w011117 (1 Post)
  66. luxxxian (1 Post)
  67. loverofdream (1 Post)
  68. lvanderree (1 Post)
  69. robw (1 Post)
  70. SeaSharp (1 Post)
  71. xpressive (1 Post)
  72. jeremia (1 Post)
  73. wm003 (21 Posts)
  74. miti (1 Post)
  75. sfrancolla (1 Post)
  76. Blob (1 Post)
  77. WoLpH (5 Posts)
  78. khatuido (3 Posts)
  79. zacware (3 Posts)
  80. mepfuso (2 Posts)
  81. wasp (1 Post)
  82. sharpguy (1 Post)
  83. stevets (1 Post)
  84. fred (1 Post)
  85. eliasp (3 Posts)
  86. h0tzenpl0tz (1 Post)
  87. tonedeaf (1 Post)
  88. Zolcsi (3 Posts)
  89. dearsina (1 Post)
  90. efattal (3 Posts)
  91. franck34 (3 Posts)
  92. tyr (1 Post)
  93. cybertaz (1 Post)
  94. zergworld (8 Posts)
  95. sekundek (1 Post)
  96. cs_alpha (3 Posts)
  97. Sultanalifezar (3 Posts)
  98. emily (7 Posts)
  99. jwendt@iscinternational.com (1 Post)
  100. sinma (1 Post)
  101. ItsMee (3 Posts)
  102. Nic (1 Post)
  103. sksoft (4 Posts)
  104. mjhaston (1 Post)
  105. mattb (4 Posts)
  106. jenner (1 Post)
  107. 2le (1 Post)
  108. bluefeet (1 Post)
  109. PremiereGlobal (2 Posts)
  110. rtozati (1 Post)
  111. KirkOlson (4 Posts)
  112. False Maria (1 Post)
  113. jbd007 (5 Posts)
  114. c.barca (1 Post)
  115. nctag (34 Posts)
  116. kfironit123 (1 Post)
  117. Emt (1 Post)
  118. ub3rn00b (12 Posts)
  119. Ballsacian1 (1 Post)
  120. mprice (1 Post)
  121. srikanthnukala (2 Posts)
  122. Mots (2 Posts)
  123. yhwh (1 Post)
  124. el777 (1 Post)
  125. JoomlaMan (1 Post)
  126. sanjivank (1 Post)
  127. sdetweil (1 Post)
  128. Snakehit (1 Post)
  129. msynovic (2 Posts)
  130. Snuyt (1 Post)
  131. as (2 Posts)
  132. pkmiec (2 Posts)
  133. epoks (2 Posts)
  134. NoahK17 (1 Post)
  135. praneeth528 (2 Posts)
  136. bemn (1 Post)
  137. Remy (1 Post)
  138. Daniel_Brazil_Campinas (1 Post)
  139. freddyk (4 Posts)
  140. dshorthouse (1 Post)
  141. dahman7 (1 Post)
  142. Canard64 (1 Post)
  143. dkuz (2 Posts)
  144. xsuniwov (1 Post)
  145. neha.chopra (1 Post)
  146. Eric24 (2 Posts)
  147. Mandeep (2 Posts)
  148. ttbgwt (6 Posts)
  149. suzan (1 Post)
  150. tenthcup (5 Posts)
  151. excelsis (5 Posts)
  152. DaveBrewster (6 Posts)
  153. rusty124 (1 Post)
  154. bcmatz (3 Posts)
  155. bjcullinan (1 Post)
  156. sstratton (4 Posts)
  157. Scorpie (1 Post)
  158. supercharge2 (3 Posts)
  159. Bing Qiao (6 Posts)
  160. tmaung (1 Post)
  161. xenon (4 Posts)
  162. sureaintme (5 Posts)
  163. animeshsingh (2 Posts)
  164. NicoP (29 Posts)
  165. cyfl (2 Posts)
  166. simplessus (1 Post)
  167. imnphd (1 Post)
  168. mono blaine (5 Posts)
  169. Kango_V (5 Posts)
  170. cain06 (1 Post)
  171. charak (2 Posts)
  172. vayumahesh (1 Post)
  173. Gabor Turi (1 Post)
  174. daeghran (2 Posts)
  175. maceido (5 Posts)
  176. sgoswami (1 Post)
  177. rubaiz (1 Post)
  178. Jabe (1 Post)
  179. ecarrenho (1 Post)
  180. mpereira (1 Post)
  181. changhua (4 Posts)
  182. alexw23 (1 Post)
  183. fxmisticat (5 Posts)
  184. extjssiva (1 Post)
  185. f1xxx3r (1 Post)
  186. SimoAmi (1 Post)
  187. aj3423 (1 Post)
  188. kkothari (2 Posts)
  189. jmariani (28 Posts)
  190. ibet (3 Posts)
  191. SunWuKung (1 Post)
  192. micgala (2 Posts)
  193. inptisto (1 Post)
  194. TheColonel (1 Post)
  195. cdeguzman (1 Post)
  196. ektanit (6 Posts)
  197. James Wang (1 Post)
  198. PCBingoB (1 Post)
  199. flylaputa (1 Post)
  200. MacSimon (1 Post)
  201. pibree (2 Posts)
  202. Markus (1 Post)
  203. aleister999 (2 Posts)
  204. adamli (2 Posts)
  205. jmaisel (4 Posts)
  206. pdugas (1 Post)
  207. plaak (1 Post)
  208. coriolis (2 Posts)
  209. weazil (4 Posts)
  210. fwiethof (1 Post)
  211. meroy (19 Posts)
  212. lxf1101 (2 Posts)
  213. stephen.friedrich (3 Posts)
  214. vinepod (1 Post)
  215. yuriy (2 Posts)
  216. completej (1 Post)
  217. dan_jf (1 Post)
  218. harel (2 Posts)
  219. veenvliet.morion (2 Posts)
  220. yura620310 (1 Post)
  221. barncat (1 Post)
  222. DmitrySistor (2 Posts)
  223. pclovec (3 Posts)
  224. Ranma13 (1 Post)
  225. swang (4 Posts)
  226. calugaru.cristian (5 Posts)
  227. mohan_b (1 Post)
  228. karlsnyder0 (2 Posts)
  229. JimmyInMD (2 Posts)
  230. tolitius (1 Post)
  231. a.labeau (2 Posts)
  232. benjixx (1 Post)
  233. psm1963 (1 Post)
  234. sosy (1 Post)
  235. nosferatum (9 Posts)
  236. daddie888 (1 Post)
  237. ixvivxi (1 Post)
  238. dp814082 (1 Post)
  239. nickelj (4 Posts)
  240. wifi4psp (1 Post)
  241. drian (1 Post)
  242. su-aska (1 Post)
  243. SebTardif (1 Post)
  244. danceric (1 Post)
  245. DTSman (1 Post)
  246. brian.moeskau (1 Post)
  247. Neethi (2 Posts)
  248. sango (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