PDA

View Full Version : Grid Problem row height



Valentina
4 Jun 2012, 4:46 AM
Hi,

I've a problem with my grid.
My grid Definitions are:



Ext.define('csa.grid.cargobooking',{
extend: 'Ext.grid.Panel',
store: Ext.data.StoreManager.lookup('cargobookingstoreid'),
id: 'csagridcargobookingid',
loadMask: true,
frame: false,
height: 150 ,
width: 900 ,
plugins: [cellEditingcargobooking,{ptype: 'rowexpander',rowBodyTpl : []}],
columns:[
{
text: 'xBookingItem',
dataIndex: 'xBookingItem',
id:'cargobookingitem-xBookingItemid',
align:'left',
width:50,
hideable:false,
sortable:false,
hidden:true,
menuDisabled:true
},
{
text: 'Seller',
dataIndex: 'Seller',
id:'cargobookingitem-Sellerid',
align:'left',
hideable:false,
sortable:false,
hidden:true,
menuDisabled:true
},
{
text: 'Notify',
dataIndex: 'Notify',
id:'cargobookingitem-Notifyid',
align:'left',
hideable:false,
sortable:false,
hidden:true,
menuDisabled:true
},
{
text: 'Consignee',
dataIndex: 'Consignee',
id:'cargobookingitem-Consigneeid',
align:'left',
hideable:false,
sortable:false,
hidden:true,
menuDisabled:true
},
{
text: 'Commodity Id',
dataIndex: 'CommodityId',
id:'cargobookingitem-CommodityIdid',
align:'left',
width:100,
hideable:true,
sortable:true,
hidden:false,
menuDisabled:false,
field: Ext.create('Ext.form.field.Text')
},
{
text: 'Commodity Text',
dataIndex: 'CommodityText',
id:'cargobookingitem-CommodityTextid',
align:'left',
width:180,
hideable:true,
sortable:true,
hidden:false,
menuDisabled:false,
field: Ext.create('Ext.form.field.Text')
},
{
text: 'Pieces',
dataIndex: 'NoPcs',
id:'cargobookingitem-NoPcsid',
align:'left',
width:80,
hideable:true,
sortable:true,
hidden:false,
menuDisabled:false,
field: new Ext.form.NumberField({})
},
{
text: 'Packages',
dataIndex: 'NoPkgs',
id:'cargobookingitem-NoPkgsid',
align:'left',
width:80,
hideable:true,
sortable:true,
hidden:false,
menuDisabled:false,
field: new Ext.form.NumberField({})
},
{
text: 'Pkg Type',
dataIndex: 'xPackageType',
id:'cargobookingitem-xPackageTypeid',
align:'left',
width:80,
hideable:true,
sortable:true,
hidden:false,
menuDisabled:false,
field: new Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
lazyRender: true,
queryMode: 'local',
store: Ext.StoreMgr.lookup("packagetypeid"),
minChars : 1,
mode: 'local',
valueField: 'xPackageType',
displayField: 'Description',
allowBlank: true,
queryMode: 'local',
id:'packagetypebookingcomboid'
}),
renderer: Ext.ux.comboBoxRenderer(Ext.getCmp('packagetypebookingcomboid'))

},
{
text: 'Volume',
dataIndex: 'Volume',
id:'cargobookingitem-Volumeid',
align:'left',
width:50,
hideable:true,
sortable:true,
hidden:false,
menuDisabled:false,
field: Ext.create('Ext.form.field.Text')
},
{
text: 'Weight',
dataIndex: 'Weight',
id:'cargobookingitem-Weightid',
align:'left',
width:50,
hideable:true,
sortable:true,
hidden:false,
menuDisabled:false,
field: Ext.create('Ext.form.field.Text')
},
{
text: 'Weight Netto',
dataIndex: 'WeightNetto',
id:'cargobookingitem-WeightNettoid',
align:'left',
width:80,
hideable:true,
sortable:true,
hidden:false,
menuDisabled:false,
field: Ext.create('Ext.form.field.Text')
},
{
text: 'HS Code',
dataIndex: 'HSCode',
id:'cargobookingitem-HSCodeid',
align:'left',
width:70,
hideable:true,
sortable:true,
hidden:false,
menuDisabled:false,
field: Ext.create('Ext.form.field.Text')
},
{
text: 'xOrder',
dataIndex: 'xOrder',
id:'cargobookingitem-xOrderid',
align:'left',
width:80,
hideable:false,
sortable:false,
hidden:true,
menuDisabled:true
},
{
text: 'Reference',
dataIndex: 'Value',
id:'cargobookingitem-Valueid',
align:'left',
width:80,
hideable:false,
sortable:false,
hidden:true,
menuDisabled:true
},
{
text: 'xOrderItem',
dataIndex: 'xOrderItem',
id:'cargobookingitem-xOrderItemid',
align:'left',
width:10,
hideable:false,
sortable:false,
hidden:true,
menuDisabled:true
},
{
text: 'xBooking',
dataIndex: 'xBooking',
id:'cargobookingitem-xBookingid',
align:'left',
width:10,
hideable:false,
sortable:false,
hidden:true,
menuDisabled:true
},
{
text: 'Status',
dataIndex: 'Status',
id:'cargobookingitem-Statusid',
align:'left',
width:50,
hideable:true,
sortable:false,
hidden:false,
menuDisabled:false,
renderer: bookingitemstatusrenderer

}
]
});


35906

Why the rows are so height?

Best Regards

Valentina

scottmartin
4 Jun 2012, 8:38 AM
Could it be your plugin?
plugins: [cellEditingcargobooking,{ptype: 'rowexpander',rowBodyTpl : []}],

Scott.

Valentina
5 Jun 2012, 2:48 AM
Hi Scott,

I've tried without both plugins, but it dosen't work.

Do you have any other idea?

scottmartin
5 Jun 2012, 6:02 AM
Then I would say one of your renderers are causing this.

Scott.

Valentina
5 Jun 2012, 6:08 AM
Hi Scott,

I've found out. I've <br> in the store. I've use the Ext.util.Format.nl2br() function. Now it looks good,

Thank you for your help.

Best Regards

Valentina