PDA

View Full Version : Remove column headers in dynamic grid



sencha.user
20 Nov 2012, 5:02 AM
Hi,

I am using dynamic grid and model plugin,
http://www.sencha.com/forum/showthread.php?242594-Dynamic-grid-with-dynamic-model

I will send in query dynamically to php file and it forms grid, but when there is no data, it still has column header like,
40203

How do I remove column header? I want empty grid when there is no data.

Thanks!

sencha.user
20 Nov 2012, 5:44 AM
Some more info,

I have dynamic grid in the panel like,

{
xtype: 'dynamicGrid',
url: 'php/update.php',
viewConfig: {
autoRender: true
}
}

If I am not sending parameter to PHP, I shouldn't get column header. Currently I have it like,

if (arrayValues == '')
{
alert("Select a column name");
}
else
{
var dynamicGrid = Ext.ComponentQuery.query('dynamicGrid')[0];
dynamicGrid.getStore().load({
params:{
param1: [arrayValues]
}
});
}

I want to do something in that alert portion to clear column header, since I don't define store for this grid, I don't know how to do.

sencha.user
20 Nov 2012, 9:05 PM
Anyone?