Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8128739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:01:02+00:00 2026-06-06T08:01:02+00:00

I am having trouble with a simple table layout in ExtJs 4.0. I have

  • 0

I am having trouble with a simple table layout in ExtJs 4.0. I have 4 panels, which I would like to arrange in a 2X2 panel format. Normally this would be 2 columns and 2 rows, and I can do that in ExtJs successfully; however, for my purposes I would like to have 4 columns and 2 rows. I want the layout to be like so:

|1|222|
|33|44|

Panel 1: spans one column, one row

Panel 2: spans 3 columns, one row

Panel 3: spans 2 columns, one row

Panel 4: spans 2 columns, one row

This seems simple enough to do, but I can’t seem to get it working correctly!
The following is the entirety of my code, which I copied and modified from the ExtJs example at : http://docs.sencha.com/ext-js/4-0/#!/example/layout/table.html (for some reason the example doesn’t have a link to its Javascript code, but I was able to find it in my ExtJs examples folder under ext-4.0.1/examples/layout/table.js)

Ext.onReady(function() {
var panel = Ext.create('Ext.Panel', {
    id:'main-panel',
    baseCls:'x-plain',
    renderTo: Ext.getBody(),
    layout: {
        type: 'table',
        columns: 4
    },
    // applied to child components
    defaults: {frame:true, width:200, height: 200},
    items:[{
        title:'Item 1',
        colspan:1,
        width:200
    },{
        title:'Item 2', 
        colspan:3,
        width:600
    },{
        title:'Item 3', 
        colspan:2,
        width:400
    },{
        title:'Item 4',
        colspan:2,
        width:400

    }]
});

});

Now, this code, as far as I know, SHOULD work. But the result I’m getting is this:
Column Table Layout

Anyone got any hints as to why Panel 2 is being shifted one column to the right? The example from Sencha Docs has plenty of panels spanning more than one column, but I must be overlooking something and I can’t figure out what!

Thanks for all of your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:01:03+00:00Added an answer on June 6, 2026 at 8:01 am

    Add on your panel

    layout: {
        type: 'table',
        // The total column count must be specified here
        columns: 3
    },
    

    and apply this code to child items

    tdAttrs: {
        colspan: 2
    }
    

    After research and trying to create it in plain HTML, I found out that you can’t achieve what you’re looking for in one table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple table that has about 80 rows, which I populate dynamically using
I'm having trouble to make a simple CRUD in my site. I have a
So I'm having trouble with unit testing CakePHP models. Simple stuff like writing tests
I'm having trouble with a simple auto-increment using common table expressions. (I don't want
I'm having trouble with a simple radio set of two radio buttons (I don't
I am having trouble with this simple task: cat file | grep -E ^[0-9]+$
I'm having trouble compiling a simple, sample program against glib on Ubuntu. I get
I'm having trouble getting a simple class constructor to work. // In XModule.h class
I'm new to linq and having trouble writing two simple queries. For some reason,
I'm having trouble with what should be a simple program. I've written a single

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.