-
8 Dec 2012 6:09 AM #1
Grid RowExpander Problem
Grid RowExpander Problem
Greetings All:
Having a problem with the grid row exapnder. I have the following code:
When I expand the row in the grid, the only thing that displays is [objectObject]. Am I missing something? Thanks!!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 }] }] });
-
8 Dec 2012 6:45 AM #2
It looks like paymethod is an object? Have you tried echo-ing it to the console?
That would explain the result you see.
-
8 Dec 2012 8:50 AM #3
Hi Flanders:
I changed the template to look like:
and I still get the same result.Code:var rowTpl = new Ext.XTemplate( '<div>TEST</div>' );
-
10 Dec 2012 1:06 AM #4
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) ?
-
7 Feb 2013 4:20 PM #5


Reply With Quote