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 3800412
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:53:19+00:00 2026-05-19T13:53:19+00:00

I have a problem with a Ext.Grid.EditorGridPanel, I am currently using ExtJS 2.3.0, that

  • 0

I have a problem with a Ext.Grid.EditorGridPanel, I am currently using ExtJS 2.3.0, that can’t be changed. 🙁

Following the problem:

I created a window which consist of 2 FormPanel and between them the EditorGridPanel.
For the viewConfig of the grid, there is only “forceFit=true” set and no style or view options set for the ColumnModel.
Only for each column the align option is set to “center”.
The ColumnModel consits of 13 columns, more or less text only.
Now I open the website I am working on with a browser and open the window to test the GUI.
When I try to switch between the cells in a single row the entire data row moves to the left,
so that the first cells are no more shown.
After adding a new row to the grid (via an add button) the view resets and all cells for each column are displayed correctly again.
The column headers and the tbar are fixed and always correctly rendered.

The problem occurs with IExplorer 8.0x, an older Firefox version (2.0x), but the grid works fine with Firefox 3.6x and Safari 5.0x.
If someone had a similar problem and got it fixed or an idea what may causes that problem, feel free to answer. 😉
Many thanks in advance!

[edit]
Thx for comment, here some modifyed Source from the complete Source:

getTypeSelectionGrid: function() {
    this.gridRecord:  Ext.data.Record.create([
        {name:'id', type:'int'},
        {name:'start', type:'string'},
        {name:'end', type:'string'},
        {name:'mo', type:'boolean'},
        {name:'tu', type:'boolean'},
        {name:'we', type:'boolean'},
        {name:'th', type:'boolean'},
        {name:'fr', type:'boolean'},
        {name:'sa', type:'boolean'},
        {name:'su', type:'boolean'},
        {name:'type', type:'string'}
    ]);

    this.gridStore = new Ext.data.Store({
        baseParams: {
        },
        sortInfo: {field: 'id', direction: 'ASC'},
        proxy: new Ext.data.HttpProxy({
            url: '',
            method: 'post'
        }),
        reader: new Ext.data.JsonReader({
            root: 'data',
            totalProperty: 'totalCount',
            id: 'id'
        }, this.gridRecord)
    });

    var sm = new Ext.grid.RowSelectionModel({ singleSelect: true });

    var columnConfig = [];
    //auto incremented id column
    columnConfig.push({ 
        header: 'id',
        dataIndex: 'id',
        width: 50,
        editor: new Ext.form.TextField({
            anchor: '100%',
            allowBlank: false,
            disabled: true
        })
    });
    //start value for time range, values from '00:00' to '24:00' steps by second, here shorted to 2 options
    columnConfig.push({
        header: 'start',
        dataIndex: 'start',
        width: 70,
        align: 'center',
        editor: new Ext.form.ComboBox({
            store: new Ext.data.SimpleStore({
                fields: ['val', 'txt'],
                data : [['00:00', '00:00'],['24:00', '24:00']]
            }),
            displayField: 'txt',
            valueField: 'val',
            typeAhead: true,
            mode: 'local',
            triggerAction: 'all',
            selectOnFocus: true,
            saveRouting: true,
            forceSelection: true,
            anchor: '100%',
            allowBlank: false
        })
    });
    //same as above for end of time range, dataIndex 'end'

    //now 7 checkbox columns foreach weekday
    columnConfig.push({
        xtype: 'checkcolumn',
        header: 'mo',
        dataIndex: 'mo',
        align: 'center',
        width: 30
    }));
    //same as above for dataIndex 'tu', 'we', 'th', 'fr', 'sa' and 'su'

    //here simplified to SimpleStore, originally a remote store which gets the data
    //by a HttpProxy
    columnConfig.push({
        header: 'type',
        dataIndex: 'type',
        editor: new Ext.form.ComboBox({
            store: new Ext.data.SimpleStore({
                fields: ['val', 'txt'],
                data : [[1, 'type 1'],[2, 'type 2']]
            }),
            displayField: 'txt',
            valueField: 'txt',
            typeAhead: true,
            mode: 'local',
            triggerAction: 'all',
            selectOnFocus: true,
            saveRouting: true,
            forceSelection: true,
            anchor: '100%',
            allowBlank: false
        })
    });
    //then 2 plugins which have some functionality for the selected row
    //grid tested with and without both plugins, they are not the cause

    var cm = new Ext.grid.ColumnModel(columnConfig);
    cm.defaultSortable = false;

    //now the grid
    this.typeSelectionGrid = new Ext.grid.EditorGridPanel({
        store: this.gridStore,
        clicksToEdit: 1,
        autoHeight: true,
        cm: cm,
        sm: sm,
        viewConfig: {
            forceFit: true
        },
        tbar: [{
            text: 'add new row',
            cls: 'x-btn-text',
            scope: this,
            handler: function(){
                //adds a row with incremented id
            }
        }],
        listeners: {
            scope: this,
            show: function() {
                sm.selectFirstRow.defer(1000, selectionModel);
            }
        }
    });

    return this.typeSelectionGrid;
},

//the grid is then inserted between the Panels into the window component
//looks something like that
render: function() {

    var layoutFn = function(pnl) {
        pnl.ownerCt.ownerCt.doLayout.defer(Ext.isIE ? 300 : 0, pnl.ownerCt.ownerCt);
        pnl.doLayout.defer(Ext.isIE ? 500 : 200, pnl);
    };
    this.cardLayout.add({
        layout: 'border',
        border: false,
        bodyStyle: 'background-color: #fff',
        items: [
            {
                region: 'center',
                border: false,
                layout: 'column',
                autoScroll: true,
                defaults: {
                    columnWidth: 1,
                    bodyStyle: 'padding: 5px;',
                    border: false,
                    autoHeight: true,
                    layout: 'column',
                    defaults: {
                        columnWidth: 1
                    }
                },
                items: [
                    //first Ext.form.FormPanel with some TextFields
                    {
                        items: {
                            listeners: {
                                expand: layoutFn,
                                collapse: layoutFn
                            },
                            frame: true,
                            title: 'panel with a grid',
                            collapsible: true,
                            titleCollapse: true,
                            layout: 'fit',
                            autoHeight: true,
                            items: this.getTypeSelectionGrid()
                        }
                    }
                    //second Ext.form.FormPanel with some TextFields
                ]
            }
        ]
    });
}
  • 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-05-19T13:53:19+00:00Added an answer on May 19, 2026 at 1:53 pm

    First of all, it looks like you have some JavaScript syntax errors. I know you only posted a snippet of your code, but try running the whole thing through JS Lint.

    For starters:

    this.gridRecord:  Ext.data.Record.create([
        {name:'id', type:'int'},
        {name:'start', type:'string'},
        {name:'end', type:'string'},
        {name:'mo', type:'boolean'},
        {name:'tu', type:'boolean'},
        {name:'we', type:'boolean'},
        {name:'th', type:'boolean'},
        {name:'fr', type:'boolean'},
        {name:'sa', type:'boolean'},
        {name:'su', type:'boolean'},
        {name:'type', type:'string'}
    ]);
    

    Should be:

    this.gridRecord = Ext.data.Record.create([
    

    While I’m not entirely sure this would cause the problem, I see that your column configs have widths assigned to them. Even though you are setting the viewConfig property “forceFit: true”, I suspect that the editor may attempt to use the widths you have set for each column.

    See if that clears up anything.

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

Sidebar

Related Questions

I have an ExtJS grid that has a button set up in it. The
I have a JavaScript application which opens an ExtJS Window, containing an ExtJS TabPanel,
My problem is :: From a string like /usr/folder1/folder2/filename.ext I have to extract out
I have problem in some JavaScript that I am writing where the Switch statement
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I have a problem using the Java search function in Eclipse on a particular
I have a problem with a little .Net web application which uses the Amazon
I am using Ext.data.Store to call a PHP script which returns a JSON response
I'm trying to create a dynamic grid using ExtJS. The grid is built and
Using ExtJs. I'm trying to design a main which is divided into three sub

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.