Hybrid View

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    10
    Vote Rating
    0
    matteoli is on a distinguished road

      0  

    Question ColumnModel in Ext JS 4

    ColumnModel in Ext JS 4


    Hi,

    I am wondering how to instantiate a ColumnModel of a GridPanel in Ext JS 4? Is this not implemented currently or do I have to use another class?

    In Ext JS 3 the following lines worked well but failing in Ext JS 4 with the error that there is no such constructor in this class:

    Code:
    colModel = new Ext.grid.ColumnModel({
      defaults: {
        align: 'left',
        risizable: false,
        sortable: false,
        width: 150
      }
    });
    Thanks in advance!
    Oliver

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    This forum requires that you post the same question at least 4 times before there is a reply.

    Regards,
    Scott.

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    10
    Vote Rating
    0
    matteoli is on a distinguished road

      0  

    Lightbulb


    OK, OK.
    I thought the preview button would not publish the post to the forum.
    sorry.

  4. #4
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,731
    Vote Rating
    104
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      0  

    Default


    ColumnModel seems to have been replaced by 'headers'. See this example http://dev.sencha.com/deploy/ext-4.0...rray-grid.html

    Code:
    // create the Grid
        var grid = new Ext.grid.GridPanel({
            store: store,
            columnLines: true,
            headers: [
                {
                    text     : 'Company',
                    flex     : 1,
                    sortable : false, 
                    dataIndex: 'company'
                },
                {
                    text     : 'Price', 
                    width    : 75, 
                    sortable : true, 
                    renderer : 'usMoney', 
                    dataIndex: 'price'
                },
                {
                    text     : 'Change', 
                    width    : 75, 
                    sortable : true, 
                    renderer : change, 
                    dataIndex: 'change'
                },
                {
                    text     : '% Change', 
                    width    : 75, 
                    sortable : true, 
                    renderer : pctChange, 
                    dataIndex: 'pctChange'
                },
                {
                    text     : 'Last Updated', 
                    width    : 85, 
                    sortable : true, 
                    renderer : Ext.util.Format.dateRenderer('m/d/Y'), 
                    dataIndex: 'lastChange'
                }
            ],
            height: 350,
            width: 600,
            title: 'Array Grid',
            renderTo: 'grid-example',
            viewConfig: {
                stripeRows: true
            }
        });

  5. #5
    Sencha User
    Join Date
    Mar 2011
    Posts
    10
    Vote Rating
    0
    matteoli is on a distinguished road

      0  

    Default


    That might be. Do you know, what class is behind the headers? I have to instantiate it by myself, because the columns should be initialized by a dynamic backend.

  6. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    A Header extends Ext.Component.
    http://dev.sencha.com/deploy/ext-4.0...id.Header.html

    There is also HeaderContainer that wraps all the Headers which extends Ext.container.Container.
    http://dev.sencha.com/deploy/ext-4.0...Container.html
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Similar Threads

  1. [ColumnModel]
    By oneTETSUO in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 7 Oct 2010, 8:26 AM
  2. how to set ColumnModel by rpc
    By charmw in forum Ext GWT: Discussion
    Replies: 5
    Last Post: 30 Dec 2009, 2:41 AM
  3. Quicktips on ColumnModel
    By tiaquis in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 31 Jan 2008, 2:43 AM
  4. Bug in ColumnModel
    By Animal in forum Ext 1.x: Bugs
    Replies: 4
    Last Post: 25 Sep 2007, 7:38 AM
  5. IE6 and ColumnModel
    By Artur Bodera (Joust) in forum Ext 1.x: Bugs
    Replies: 3
    Last Post: 27 Apr 2007, 5:53 AM

Thread Participants: 7

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."