1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    178
    Vote Rating
    2
    TampaBay55 is on a distinguished road

      0  

    Default Grid RowExpander Problem

    Grid RowExpander Problem


    Greetings All:
    Having a problem with the grid row exapnder. I have the following code:
    Code:
    var rowTpl = new Ext.XTemplate(
     '<div>{paymethod}</div>'
    );
    Ext.define('pppApp.view.paydata.payGrid',{
     extend: 'Ext.grid.Panel',
     store: 'payStore',
     alias: 'widget.paygrid',
     columns:[
      {text: 'Account', dataIndex: 'accnt',width:135},
      {text: 'Name', dataIndex: 'name',width:225},
      {text: 'DOB', dataIndex: 'dob',xtype: 'datecolumn',format:'m/d/Y',width:70},
      {text: 'Pay Method', dataIndex: 'paymethod'},
      {text: 'Status', dataIndex: 'paystatus',width:225},
      {text: 'Amount', dataIndex: 'payamount',renderer: Ext.util.Format.usMoney}
     ],
     plugins: [{
      ptype: 'rowexpander',
      rowBodyTpl : rowTpl
     }],
     dockedItems: [{
      xtype: 'toolbar',
      dock: 'top',
      items:[{
       text: 'New Payment',   
       action: 'btnNewPayment',  
      },'-',{
       text: 'Print Receipt',
       id: 'btnPrintReceipt',
       action: 'btnPrintReceipt',   
       disabled: true
      },'-',{
       text: 'Refund Payment',
       id: 'btnVoidPayment',   
       action: 'btnVoidPayment',
       disabled: true
      }]
     }]      
    });
    When I expand the row in the grid, the only thing that displays is [objectObject]. Am I missing something? Thanks!!

  2. #2
    Sencha User
    Join Date
    Dec 2009
    Location
    Enschede, The Netherlands
    Posts
    327
    Vote Rating
    13
    flanders will become famous soon enough

      0  

    Default


    It looks like paymethod is an object? Have you tried echo-ing it to the console?

    That would explain the result you see.

  3. #3
    Sencha User
    Join Date
    May 2009
    Posts
    178
    Vote Rating
    2
    TampaBay55 is on a distinguished road

      0  

    Default


    Hi Flanders:

    I changed the template to look like:
    Code:
    var rowTpl = new Ext.XTemplate(
     '<div>TEST</div>'
    );
    and I still get the same result.

  4. #4
    Sencha User
    Join Date
    Dec 2009
    Location
    Enschede, The Netherlands
    Posts
    327
    Vote Rating
    13
    flanders will become famous soon enough

      1  

    Default


    I have reproduced the issue using the grid plugins example. It looks like rowBodyTpl will not accept an XTemplate, only a (array of) raw string(s). Which is unexpected since the RowExpander calls Ext.XTemplate.getTpl which should allow for existing Templates according to the dos.

    So after breaking down the Ext.Loader so I could set breakpoints I encountered this:
    // TODO: if XTemplate/Template receives a template as an arg, should
    // just return it back!



    I think this was fixed in Ext 4.1.2 / 4.1.3 and therefore not mentioned anymore in the source you see when opening the docs. And that leads me to the conclusion that you are using Ext 4.1.1(a) ?

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Posts
    83
    Vote Rating
    -1
    daiei27 is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by flanders View Post
    I have reproduced the issue using the grid plugins example. It looks like rowBodyTpl will not accept an XTemplate, only a (array of) raw string(s). Which is unexpected since the RowExpander calls Ext.XTemplate.getTpl which should allow for existing Templates according to the dos.

    So after breaking down the Ext.Loader so I could set breakpoints I encountered this:
    // TODO: if XTemplate/Template receives a template as an arg, should
    // just return it back!



    I think this was fixed in Ext 4.1.2 / 4.1.3 and therefore not mentioned anymore in the source you see when opening the docs. And that leads me to the conclusion that you are using Ext 4.1.1(a) ?
    I had the same issue. Thank you, sir, for saving me time with such a great explanation!

    Guess I'll have to twiddle my thumbs until 4.2.0 comes out...

Thread Participants: 2

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..."