1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    indonesia
    Posts
    17
    Vote Rating
    0
    stoneboys is on a distinguished road

      0  

    Default Unanswered: itemdblclick not working on 2nd page pagingtoolbar

    Unanswered: itemdblclick not working on 2nd page pagingtoolbar


    Hi all, What problems on my codes below? This my grid is working ok, I load store with pageSize = 10 & Use PagingToolbar , on first Pages : My listener ( itemdblclick ) is working, But I click To next Pages with PagingToolbar itemdblclick Not Working .
    this error from firebug :
    Code:
    grid.getStore().getAt(record.index) is undefined
    
    
    var rec = grid.getStore().getAt(record.index).get('Pin');
    And this my grid code :
    Code:
    Ext.define('Model',{   extend: 'Ext.data.Model', 
      fields: [
    {name: 'Pin'}, 
    
        {name: 'Name'}
    
    ] }); 
    
    
    //Store
    var Store = Ext.create('Ext.data.Store',{   pageSize: 10, 
    
      remoteSort: true, 
    
      autoDestroy: true, 
    
      autoLoad: true, 
    
      storeId: 'Store', 
    
      model: Model, 
    
      proxy:   new Ext.data.AjaxProxy({ 
    
               type: 'jsonp', 
    
                  url: 'application/reg/registration.php', 
    
                 extraParams:     { task: 'list' }, 
    
              reader:     { type: 'json', root: 'rows', totalProperty: 'results'} 
    
      }), 
    
      sorters: [{property: 'Pin', direction: 'ASC'}] 
    
    }); 
    
    
    
    var TwoGrid = Ext.create('Ext.grid.Panel',{   id: 'TwoGrid', 
    
      border: false, 
    
      stripeRows: true, 
    
      store: Store, 
    
      plugins: [Ext.create('Ext.ux.grid.GridSearch',{ 
    
                    mode: 'remote', 
    
                    width: 150 
    
        })],  
    
      bbar:   new Ext.PagingToolbar({ 
    
        store: Store, 
    
        displayInfo: true, 
    
        displayMsg: 'Displaying Patient {0} - {1} of {2}', 
    
        emptyMsg: 'No Patient to display'
    
      }), 
    
      columns: [
    {id: 'Clpin', text: 'PIN', width: 150, dataIndex: 'Pin' }, 
    
        {id: 'CName',  text: 'NAME', width: 150,dataIndex: 'Name'}
    ] ,
      listeners:   { 
    
         itemdblclick: function(grid, record, item, index, e, eOpts ) { 
    
                         var rec = grid.getStore().getAt(record.index).get('Pin');  //error here when page on 2nd page and more...
    
     Ext.MessageBox.alert('Clicked!',rec); 
    
     }}
    
     
    });
    Thanks for answer..

  2. #2
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106
    Vote Rating
    27
    friend has a spectacular aura about friend has a spectacular aura about

      0  

    Default


    Try changing this line in your listener:

    Code:
    var rec = grid.getStore().getAt(record.index).get('Pin');
    To This:

    Code:
    var rec = grid.getStore().getAt(index).get('Pin');

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