Results 1 to 7 of 7

Thread: Gridpanel don't show the columnheader names

  1. #1

    Default Gridpanel don't show the columnheader names

    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

  2. #2
    Sencha User nomack84's Avatar
    Join Date
    Oct 2007
    Location
    Quito, Ecuador
    Posts
    200

    Default

    Your grid have a width difined or have the width managed by a layout? If not of this two, try defining a width.
    Ext is terrific!!

  3. #3
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    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.

  4. #4

    Default

    Hi,

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

    Code:
    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.

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

  5. #5
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    I assume this is a problem with your own custom CSS. Do you have any CSS rules for common elements like <td>?

  6. #6

    Default

    Hi,

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

    Regards
    Crimor

  7. #7

    Default

    Quote Originally Posted by Crimor View Post

    Code:
    <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"> .....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •