PDA

View Full Version : Table Layout dosen't work right



netharry
24 Nov 2007, 5:59 AM
Hi all,
I want this layout
+--------+-----------------+
| A | B |
| |--------+--------|
| | C | D |
| |--------+--------|
| | E | F |
+--------+--------+--------+
var table = new Ext.Panel({
title: 'Table Layout',
layout:'table',
defaults: {
// applied to each contained panel
bodyStyle:'padding:20px'
},
layoutConfig: {
// The total column count must be specified here
columns: 3
},
items: [{
html: '<p>Cell A content</p>',
rowspan: 3
},{
html: '<p>Cell B content</p>',
colspan: 2
},{
html: '<p>Cell C content</p>'
},{
html: '<p>Cell D content</p>'
},{
html: '<p>Cell E content</p>'
},{
html: '<p>Cell F content</p>'
}]
});
But it displays like this:
+--------+-----------------+
| A | B |
| |--------+--------|---------|
| | C | D | E |
| |--------+--------|---------|
| | F |
+--------+--------+--------+

How to solve it ? thanks

evant
24 Nov 2007, 7:20 AM
Why are you specifying 3 columns? Doesn't the example you've provided only have 2?

netharry
24 Nov 2007, 7:44 AM
No, it should like this:


___________________________________
| A | B |
__________________________
| | C | D |
__________________________
| | E | F |
___________________________________

sfwalter
24 Nov 2007, 10:12 AM
Have u looked at the DOM through Firebug? Is it generating the correct table tags (i.e. td and tr)? If so it could just be a styling issue with column sizes.

If its not generating the correct table tags have a look at this post: http://extjs.com/forum/showthread.php?t=16526