1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    4
    Vote Rating
    0
    tane is on a distinguished road

      0  

    Default Grid DataModel keeps data in memory

    Grid DataModel keeps data in memory


    Hello , I am newbie at yui-ext and yui-ext is THE THE most js lib I saw.
    Thank you Jack.

    Anyway I have litle problem I use Xajax for creating array to supply my js function which is loads
    in my init.js.
    Basicly my idea work like this.

    init.js -- loads grids and other stuff
    the i have litle

    function load_nzp(mydata_array) {

    This setups the grid and shows it .
    }


    now from xajax i call load_nzp(mydata_array); and send my array

    Now everything display good , but then i try to do a click event and take data from grid.

    Then I tryed this.
    Code:
     
    var onRowClick = function(grid, rowIndex, e) {
                     
                            qq=grid.dataModel.getValueAt(rowIndex, 0)
                            alert(qq);
                            
                            }
         
    
         var grid = new YAHOO.ext.grid.Grid('inner2', dataModel, colModel);
          
          grid.addListener('rowclick', onRowClick);
    
         this.grid = grid;
        
         grid.render();
    Then I try to load againg some ether data into the grid.
    Everything display fine in a grid.
    But when i try to click on grid row I get old data and get two alerts oldvalue and new value.

    So evry time when i call from xajax load_nzp(new_data_array) i get oldarrays+new_data_array.

    Probably my concept is not good or I am mising something.
    So if somone would be kind to help with this problem i would be very greatfull.
    Thank you

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    4
    Vote Rating
    0
    tane is on a distinguished road

      0  

    Default Here is the live example of the problem With XML load

    Here is the live example of the problem With XML load


    I made some example do demonstrate the problem here is the url

    http://tane.grappoloin.com/yui-ext/e.../xml-grid.html

    just clik on data1 or data2 button then click on some row in grid

    you will see the problem.

    I probaly doing something wrong but I just do not have clue what is it

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Well, you're calling XmlExample.loadGrid when the button is pressed.

    That's already been called once. You're adding that function as a listener again!

    Basic organization! Init the grid and listeners in the init function! load the grid in the load function.

Similar Threads

  1. Grid: Paging of JavaScript Array already in memory
    By Preston in forum Ext 1.x: Help & Discussion
    Replies: 35
    Last Post: 27 Nov 2013, 10:26 AM
  2. JSON Grid Datamodel Example/Help
    By ojintoad in forum Ext 1.x: Help & Discussion
    Replies: 12
    Last Post: 22 Feb 2010, 6:10 AM
  3. [SOLVED] Memory Leak in Paging Grid Example?
    By cobnet in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 3 May 2007, 8:24 PM
  4. Replies: 3
    Last Post: 20 Mar 2007, 10:26 PM
  5. Setting JsonView and DataModel data from existing JSON obj
    By slacker775 in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 18 Jan 2007, 3:35 PM

Thread Participants: 1

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