PDA

View Full Version : Master/Detail improved width metadata



malotor
12 Oct 2008, 12:21 AM
I

mjlecomte
12 Oct 2008, 3:31 AM
by default autoExpandColumn takes an id, not boolean. I don't see how you're using it in your code though.

I see how other things are not working after I click around a bunch of times. There is firebug errors and IE errors you might fix which might help you discover your other problems.

malotor
13 Oct 2008, 7:47 AM
I have another problem. When i click a row for the firts time i have this error

this.body is undefined
[Break on this error] var hd = this.body.up('div.x-panel-bwrap').prev();

Then , if i select the metaform tab and click in another row i works perfectly.

Here is the code

[CODE]
/**********************************************************************
MasterDetailGrid
**********************************************************************/
MasterDetailGrid=Ext.extend( Ext.ux.AutoGridPanel, {
// override
initComponent : function() {

Ext.apply(this, {
store : new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'list.php'
}),
reader: new Ext.data.JsonReader()
}),

sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
viewConfig: {
forceFit: true
},
loadMask: true
});
// finally call the superclasses implementation
MasterDetailGrid.superclass.initComponent.call(this);
}
});
Ext.reg('MasterDetailGrid', MasterDetailGrid );


detailPanel = Ext.extend(Ext.TabPanel, {

initComponent: function() {



Ext.apply(this, {
activeItem: 0,

items:[
{
/*******************************************************************************
DATOS DEL REGISTRO
********************************************************************************/
itemId: 'regdata',
title: 'Datos',
layOut:'fit',
bodyStyle:'padding:10px;',
autoScroll:true,
tbar : [
new Ext.Action({
scope: this,
text: '',
handler: function(){

},
iconCls: 'print_icon'
})
]
},
{
itemId: 'regform',
title: 'Metaform',
xtype: 'metaform',
url: 'detail.php'

}
]
});
// call the superclass's initComponent implementation
detailPanel.superclass.initComponent.call(this);
},

// add a method which updates the details
updateDetail: function(record) {

alert(record.id);
//Actualizamos las pesta