-
28 Jul 2008 6:16 PM #1
The table header doesn't show
The table header doesn't show
extjs 2.0.2, when using form-markup.js to render an existing HTML table, the header of the table run away, i don't know why
The structure of the existing table is like the following:
I even modify ext-all.css and changeCode:<table id='..'> <thead> <tr>..</tr> </thead> <tbody> <tr>...</tr> </tboby> </table>
toCode:.x-grid3-header-offset{padding-left:1px;width:10000px;}
But it doesn't helpCode:.x-grid3-header-offset{padding-left:1px;width:auto;}
Updated: the header appears in IE, but very very ugly and in Firefox, it doesn't show up at all
-
28 Jul 2008 7:17 PM #2
Have you specified a width or height when creating the TableGrid?
Are you using th's within your thead?
Could you post some more code so that we could try to troubleshoot this further?Aaron Conran
@aconran
Sencha Architect Development Team
-
28 Jul 2008 8:17 PM #3
Actually, the table is created using php dynamically
The whole structure is likeCode:<?php ... echo "<TH>Product</TH>; ... ?>
In from-markup.js (extjs 2.0.2 version)Code:<TABLE cellspacing='0' id='mytesttable'> <thead> <TR style='background:#eeeeee;'> <TH>Product</TH> <TH>Date</TH> <TH>Owener</TH> </thead> <tbody> <TR><TD><center><B>Hello1<B></center></TD><TD>2007-01-01</TD><TD><a href='url'>ME</a></TD></TR> <TR><TD><center><B>Hello2<B></center></TD><TD>2007-01-02</TD><TD><a href='url'>Y</a></TD></TR> </tbody> </table>
I change
toCode:var btn = Ext.get("create-grid"); btn.on("click", function(){ btn.dom.disabled = true; // create the grid var grid = new Ext.grid.TableGrid("the-table", { stripeRows: true // stripe alternate rows }); grid.render(); }, false, {single:true}); // run once
Code:var grid = new Ext.grid.TableGrid("mytesttable", { stripeRows: true // stripe alternate rows }); grid.render();
In Firefox, the grid header is missing.
In IE 7, the grid header shows up, but when I chose 'Columns' and unselect 'Date' column, the table became very ugly because the table header will be align left and the tbody is align center, like
___________________________
|Product | Owner | |
-------------------------------
| Hello1 | ME |
--------------
| Hello2 | Y |
-------------------------------
Thanks~
-
28 Jul 2008 9:52 PM #4
Before troubleshooting further can you test out Ext 2.1?
Aaron Conran
@aconran
Sencha Architect Development Team
-
28 Jul 2008 10:15 PM #5
I tried 2.1 just now and this time Firefox can show the table header normally like IE. But when I unselect some column, the same problem still exists, the table header will be align left while the tbody will be align center. Is there anything wrong with my HTML table? Or do I have to disable the unselect column feature? Thanks~


Reply With Quote