PDA

View Full Version : Hide grid header



Mycoding
2 Aug 2010, 2:28 AM
Please give me advice how to hide grid header?
I tryed as written on some topics, but that doesn't work.
Grid code is so:


var cities = new Ext.grid.GridPanel({
title:'??????',
id:'citiesGrid',
region: 'east',
width: 200,
store:store,
sm:new Ext.grid.RowSelectionModel({
singleSelect: true,
listeners: {
rowselect: {
fn: function(sm,index,record) {
//alert(record.data.id);
shops.setTitle('???????? ? ?????? '+record.data.name);
storeShop.load({params:{map:checked_map,city_id:record.data.id}});
if(selected_city!=-1){
city[selected_city].svg.animate({r:3},1000);
city[selected_city].svgText.hide();
}
selected_city=index;
city[index].svg.animate({r:10},1000);
city[index].svgText.show();
}
}
}
}),
columns: [
{header: '?????', dataIndex: 'name', renderer: name_renderer,width:200,id:'gridHeadCity'}
]
});

Animal
2 Aug 2010, 3:09 AM
Use this

http://i131.photobucket.com/albums/p286/TimeTrialAnimal/hideinherited.jpg

Then look for configs which might help.

Condor
2 Aug 2010, 3:14 AM
Configure the grid with hideHeaders:true.

Mycoding
2 Aug 2010, 3:21 AM
Thanks a lot.

hideHeaders:true.
Works

devtig
7 Sep 2010, 5:32 AM
I'd like to unhide the headers later. Is there a method for it? I can't find it in the API docs http://dev.sencha.com/deploy/dev/docs/?class=Ext.grid.GridPanel

Condor
7 Sep 2010, 5:46 AM
grid.getView().mainHd.setDisplayed(true);

for an autoHeight:false grid you also need to call layout() after this.