1. #1
    Sencha User
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    20
    Vote Rating
    0
    wqjh7809 is on a distinguished road

      0  

    Default Problems with locked column grid

    Problems with locked column grid


    I've got two problems by using locked columns.

    First: The layout is broken by grouping my data in the grid because the groupHeaderTpl is missing at the right side:

    fehler-locked.png

    Second: I'm using the afterrender listener to add an custom item to the menu:


    Code:
     
     var grid = new Ext.grid.GridPanel({
    //(...)
     listeners: {
                    'afterrender': function () {
                            var menu = this.headerCt.getMenu();
                            menu.add([{
                                text: 'custom item',
                                id: 'customMenuItem',
                                handler: function () {
                                   //(...)
    But I get an error if the colum is locked because the headerCt is undefined. Without locking it's no problem.

    Have you any ideas to this?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    850
    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


    What Ext JS 4.x.x version are you using?
    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.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    20
    Vote Rating
    0
    wqjh7809 is on a distinguished road

      0  

    Default


    I'm using 4.1.0 (Build date: 2012-04-20 14:10:47) and tests it with 4.1.1a too, and the errors are the same.
    Last edited by wqjh7809; 26 Nov 2012 at 12:35 AM. Reason: further information

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    850
    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


    You may want to keep up with updates. I know there was some work done with locked columns but nto sure if it was for 4.1.1 or for 4.1.2/4.1.3
    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.

  5. #5
    Sencha User
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    20
    Vote Rating
    0
    wqjh7809 is on a distinguished road

      0  

    Default 4.1.3

    4.1.3


    Now I test it with 4.1.3 (Build date: 2012-10-25 15:13:53) and the errors are the same. Have you any idea?

  6. #6
    Sencha User
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    20
    Vote Rating
    0
    wqjh7809 is on a distinguished road

      0  

    Default


    I've test it with 4.2. beta - the errors are still there.

    For the broken layout I think there is a problem with the group header. I used the following code to get the text of the group:

    Code:
            var grid = new Ext.grid.GridPanel({
                store: Ext.data.StoreManager.lookup('oppsStore'),
                loadMask: true,
                renderTo: document.body,
                enableLocking: true,
                features: [{
                    id: 'groupConfig',
                    ftype: 'groupingsummary',
                    groupHeaderTpl: Ext.create('Ext.XTemplate', '{name:this.getHeaderName([values.rows[0]])}', {
                        getHeaderName: function (name, values) {
                            if (regGuid.test(name)) {
                                return values[0].customerName;
                            } else {
                                return name;
                            }
                        }
                    }),
                    enableGroupingMenu: false
                }],
                listeners: {
                   ...
    In 4.2 beta the group header is totaly missing - is this an error in my code? Without locking it is no problem. I think this is the reason for the missing group header in the right side: the missing line spacing above each group.