Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Aug 2010
    Posts
    1
    Vote Rating
    0
    Dan Ellison is on a distinguished road

      0  

    Default [FIXED-202] grid rendering wrong xtype in colModel (auto columns broken)

    [FIXED-202] grid rendering wrong xtype in colModel (auto columns broken)


    In a effort to learn to use the designer I have attempted to implement one of the standard examples, Paging Grid, via the designer interface. I create a JsonStore which is correctly coded by the designer to produce the following code:

    Code:
    ExtForum = Ext.extend(Ext.data.JsonStore, {
        constructor: function(cfg) {
            cfg = cfg || {};
            ExtForum.superclass.constructor.call(this, Ext.apply({
                storeId: 'ExtForum',
                root: 'topics',
                idProperty: 'threadid',
                totalProperty: 'totalCount',
                remoteSort: true,
                fields: [
                    {
                        name: 'title'
                    },
                    {
                        name: 'forumtitle'
                    },
                    {
                        name: 'forumid'
                    },
                    {
                        name: 'author'
                    },
                    {
                        name: 'replycount',
                        type: 'int'
                    },
                    {
                        name: 'lastpost',
                        type: 'date',
                        dateFormat: 'timestamp'
                    },
                    {
                        name: 'lastposter'
                    },
                    {
                        name: 'excerpt'
                    }
                ]
            }, cfg));
        }
    });
    new ExtForum();
    This code is correct. However, when designer maps the fields to the colModel I end up with the column xtype being "off by 1". The following code is what designer generates:

    Code:
    columns: [
                                        {
                                            xtype: 'gridcolumn',
                                            dataIndex: 'title',
                                            header: 'Title',
                                            sortable: true,
                                            width: 420,
                                            editable: false,
                                            id: 'topic'
                                        },
                                        {
                                            xtype: 'numbercolumn',
                                            dataIndex: 'author',
                                            header: 'Author',
                                            sortable: true,
                                            width: 100,
                                            align: 'right',
                                            hidden: true
                                        },
                                        {
                                            xtype: 'datecolumn',
                                            dataIndex: 'replycount',
                                            header: 'Replies',
                                            sortable: true,
                                            width: 70,
                                            align: 'right',
                                            editable: false
                                        },
                                        {
                                            xtype: 'gridcolumn',
                                            header: 'Last Post',
                                            sortable: true,
                                            width: 150,
                                            dataIndex: 'lastpost',
                                            id: 'last'
                                        }
                                    ]
    The xtype order that should have been created is gridcolumn, gridcolumn, numbercolumn, datecolumn. Looks like an off by 1 error but could be a problem with my approach I guess. Regardless, the resulting output is wrong. I have attached the .xds that will reproduce the error.

    Any insight or suggestions much appreciated,
    Dan
    Attached Files

  2. #2
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Thanks Dan, the Auto Columns feature is a known bug and is already an open ticket #202. Thanks for reporting this.

Similar Threads

  1. Replies: 6
    Last Post: 18 Aug 2010, 9:24 AM
  2. [FIXED-86] Box Component xtype wrong
    By dr1811 in forum Ext Designer: Bugs
    Replies: 2
    Last Post: 2 Apr 2010, 6:14 PM
  3. What am I doing wrong? (xtype grid)
    By janhov in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 13 Mar 2009, 5:29 AM
  4. Replies: 7
    Last Post: 15 Feb 2009, 7:15 PM

Thread Participants: 1

Tags for this Thread