PDA

View Full Version : Gridpanel don't show the columnheader names



Crimor
4 May 2009, 6:37 AM
Hi,

I have two strange behaviours with the gridpanel. When I create the panel with the header column names this names don't show up on my asp site until I drag and drop the header colums or reload the simplestore? The grid is initialized with a js function called from the asp site by body onload. The initialized grid call gets valid date which are shown on the asp site but not the column header names.

The secound problem is that the column headers can be sorted but the icons in the column menu are not right displayed within IE7?

Any hints?

Regards
Stephan

nomack84
4 May 2009, 6:41 AM
Your grid have a width difined or have the width managed by a layout? If not of this two, try defining a width.

Condor
5 May 2009, 12:27 AM
1. As mentioned, a grid needs a width to display correctly.
2. If you render the grid into a centered element you need to add style:'text-align:left' to the grid config.

Crimor
5 May 2009, 3:25 AM
Hi,

no changes below you see my grid code. I deactived the menu for column headers now.



grid = new Ext.grid.GridPanel({
store: store,
columns: [
{id:'No',header: "No", width: 80, align: 'center', sortable: false, menuDisabled: true, dataIndex: 'No'},
{header: "Name", width: 326, sortable: false, menuDisabled: true, dataIndex: 'name'},
{header: "Adl Id", width: 110, align: 'center', sortable: false, menuDisabled: true, dataIndex: 'adlId'},
{header: "RR Id", width: 100, align: 'center', sortable: false, menuDisabled: true, dataIndex: 'rrId'},
{header: "Version", width: 60, align: 'center', sortable: false, menuDisabled: true, dataIndex: 'version'}
],
sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
stripeRows: true,
height:300,
width:680,
style:'text-align:left',
title:'Sites'
});



The wird think is if i put the div tag on the bottom of my asp site the missing header names are gone still the wrong column header menue icons persists?

I placed the grid id tag into a table in the asp site like below.



<table width="100%">
<tr>
<td width="10px"></td>
<td colspan="3" id="grid"></td>
<td width="10px"></td>
</tr>
</table>


Regards
Crimor

Condor
5 May 2009, 3:50 AM
I assume this is a problem with your own custom CSS. Do you have any CSS rules for common elements like <td>?

Crimor
7 May 2009, 2:53 AM
Hi,

I have checked the css and remove every custom css file from the layout but the problem still persists :(.

Regards
Crimor

ehe888
4 Jul 2009, 8:09 AM
<table width="100%">
<tr>
<td width="10px"></td>
<td colspan="3" id="grid"></td>
<td width="10px"></td>
</tr>
</table>


Regards
Crimor

Hi Crimor,
You should change the table style definition, give it align="left" style, then everything will work well.
<td colspan="3" align="left"> .....