Results 1 to 3 of 3

Thread: Ext.grid.Panel column menu rendering out of place

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2008
    Posts
    5
    Vote Rating
    0
      0  

    Default Ext.grid.Panel column menu rendering out of place

    Hi,

    I've been working on Ext 4 integration for our platform and did one of our latest grid view's using an Ext.grid.Panel from Ext 4.

    My question is related to the drop-down from a column header that allows for choosing sort and available columns. It is rendering properly in the X direction, however, it seems to always be set with an initial value of top: 0; thus causing it to render at the top of the page. See attached screen cap.

    I've been looking for a while and I can't quite figure out how this property is getting set by the layout. Any ideas on how I can figure out where the calculation is going awry?

    Code:
        Ext.require([
            'Ext.grid.*',
            'Ext.data.*',
            'Ext.util.*',
            'Ext.state.*'
        ]);
    
    
        function init() {
    
    
            Ext.QuickTips.init();
    
    
            Ext.define('employee', {
                extend : 'Ext.data.Model',
                fields : [
                    {name: 'eid',       type: 'string'},
                    {name: 'firstName', type: 'string'},
                    {name: 'lastName',  type: 'string'},
                    {name: 'age',       type: 'int'},
                    {name: 'eyeColor',  type: 'string'}
                ]
            });
    
    
            var data = {
                employees : [
                    {
                        eid       : '1238-2318-1238-1777',
                        firstName : 'Nick',
                        lastName  : 'Arnold',
                        age       : 25,
                        eyeColor  : 'Green'
                    },{
                        eid       : '2382-2390-2312-7866',
                        firstName : 'Steve',
                        lastName  : 'Buscemi',
                        age       : 53,
                        eyeColor  : 'Brown'
                    }
                ]
            };
    
    
            var store = Ext.create('Ext.data.ArrayStore', {
                storeId : 'employeeStore',
                model   : 'employee',
                autoLoad: true,
                data    : data,
                proxy   : {
                    type: 'memory',
                    reader : {
                        type : 'json',
                        root : 'employees'
                    }
                }
            });
    
    
            Ext.create('Ext.grid.Panel', {
                title   : 'Ext 4 Grid',
                store   : store, //Ext.data.StoreManager.lookup('employeeStore'),
                columns : [
                    {
                        header    : 'Name',
                        dataIndex : 'firstName'
                    },{
                        header    : 'Eyes',
                        dataIndex : 'eyeColor'
                    },{
                        header    : 'Age',
                        dataIndex : 'age'
                    }
                ],
                height  : 200,
                width   : 400,
                viewConfig : {
                    stripRows : true
                },
                renderTo: 'grid-ext4-test-div'
            });
        }
        Ext.onReady(init);
    I'm seeing this in all browsers.

    Thanks!
    Attached Images Attached Images

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Redwood City
    Posts
    30,626
    Answers
    15
    Vote Rating
    53
      0  

    Default

    Can you give us an actual page in which this happens, rather than just the grid code? Because it must be an "environmental" thing that's causing it.
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

  3. #3
    Ext JS Premium Member
    Join Date
    Sep 2008
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Thanks for getting back to me.

    I seemed to have found the issue that was related to this here. Looks like it has been fixed in Ext 4.0.5.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •