Hi,
How are you? I was wondering if you managed to map id to name in grip as am still having difficulty with it but am having a great learning experience using e-xgen. I’ve tried
in the store:
{name:'date'},
{name:'rvc_id', mapping: 'rvc.id',type:'int'},
{name:'postingcat_id', mapping: 'postingcat.id', type: 'int'},
{name:'sales'},
where both rvc_id and postingcat_id are foreign keys and
in the grid:
{
header:'Revenue Centre',
sortable:true,
resizable:true,
dataIndex:'rvc_id',
displayField: 'name',
value: 'id',
align: 'left',
width:140
},
but it still displaying id not name. In the form i.e xtype: combo it shows the name o.k. I been busting my head off with this for sometime now but am still stuck. Attached is my screen shot.
Secondly, how can you relate two dropdowns in a form such that when you pick an option in the first combo, the 2nd selects only related choices?
{
xtype: 'combo',
typeAhead: true,
triggerAction: 'all',
lazyRender:true,
mode: 'local',
fieldLabel: 'Revenue Centre',
store: jun.rztrvc,
hiddenName:'rvc_id',
hiddenValue:'rvc_id',
valueField: 'id',
editable: false,
selectOnFocus: true,
//displayField: 'Rvc::model()->representingColumn()',
displayField: 'name',
//allowBlank:false,
anchor: '100%'
},
{
xtype: 'combo',
typeAhead: true,
triggerAction: 'all',
lazyRender:true,
editable: false,
selectOnFocus: true,
mode: 'local',
fieldLabel: 'Posting Category',
store: jun.rztPostingcat,
hiddenName:'postingcat_id',
hiddenValue:'postingcat_id',
valueField: 'id',
//displayField: Postingcat::model()->representingColumn()',
displayField: 'postingcat_name',
//allowBlank:false,
anchor: '100%'
},
I totally love this extension. everyday is a learning experience. For all yiiers out there wanting to building applications that look more like applications and not sites, this is the extension for you.
Thank you.