Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9525 in 5.0.2.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    Cornelio Procopio, PR, Brazil
    Posts
    8
    Vote Rating
    2
    diogo.arenhart is on a distinguished road

      0  

    Default Grid paging bug when using the grouping feature

    Grid paging bug when using the grouping feature


    Hello.


    I've seen this bug in ExtJS 4.2.1 Beta 1 (ext-4.2.1.744) and in the last nightly build ext-4.2.1-20130416-beta (ext-4.2.1.760).


    If you have a grid with PagingToolbar and grouping feature, when seen the 2nd page you're not enable to select the grid rows.


    You can do it with the grid paging example (paging.js), just following the steps:
    1. comment the grid property "disableSelection: true" (line 75)
    2. add the grid property "features: [{ftype:'grouping'}]"
    3. run the example, go to 2nd page and try to select any row


    The problem is when using the grouping feature (step 2). Some bug does'nt allow the user to select any rows in the 2nd page.


    Thank you,
    Diogo Arenhart Marinho.

    *EDIT BY SLEMMON
    Tested in 4.2.1.760
    Code:
    Ext.tip.QuickTipManager.init();
    
    
        Ext.define('ForumThread', {
            extend: 'Ext.data.Model',
            fields: [
                'title', 'forumtitle', 'forumid', 'username',
                {name: 'replycount', type: 'int'},
                {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
                'lastposter', 'excerpt', 'threadid'
            ],
            idProperty: 'threadid'
        });
    
    
        // create the Data Store
        var store = Ext.create('Ext.data.Store', {
            pageSize: 50,
            model: 'ForumThread',
            remoteSort: true,
            proxy: {
                // load using script tags for cross domain, if the data in on the same domain as
                // this page, an HttpProxy would be better
                type: 'jsonp',
                url: 'http://www.sencha.com/forum/topics-browse-remote.php',
                reader: {
                    root: 'topics',
                    totalProperty: 'totalCount'
                },
                // sends single sort as multi parameter
                simpleSortMode: true
            },
            sorters: [{
                property: 'lastpost',
                direction: 'DESC'
            }]
        });
    
    
        // pluggable renders
        function renderTopic(value, p, record) {
            return Ext.String.format(
                '<b><a href="http://sencha.com/forum/showthread.php?t={2}" target="_blank">{0}</a></b><a href="http://sencha.com/forum/forumdisplay.php?f={3}" target="_blank">{1} Forum</a>',
                value,
                record.data.forumtitle,
                record.getId(),
                record.data.forumid
            );
        }
    
    
        function renderLast(value, p, r) {
            return Ext.String.format('{0}<br/>by {1}', Ext.Date.dateFormat(value, 'M j, Y, g:i a'), r.get('lastposter'));
        }
    
    
    
    
        var pluginExpanded = true;
        var grid = Ext.create('Ext.grid.Panel', {
            width: 700,
            height: 500,
            title: 'ExtJS.com - Browse Forums',
            store: store,
            //disableSelection: true,
            features: [{ftype:'grouping'}],
            loadMask: true,
            viewConfig: {
                id: 'gv',
                trackOver: false,
                stripeRows: false,
                plugins: [{
                    ptype: 'preview',
                    bodyField: 'excerpt',
                    expanded: true,
                    pluginId: 'preview'
                }]
            },
            // grid columns
            columns:[{
                // id assigned so we can apply custom css (e.g. .x-grid-cell-topic b { color:#333 })
                // TODO: This poses an issue in subclasses of Grid now because Headers are now Components
                // therefore the id will be registered in the ComponentManager and conflict. Need a way to
                // add additional CSS classes to the rendered cells.
                id: 'topic',
                text: "Topic",
                dataIndex: 'title',
                flex: 1,
                renderer: renderTopic,
                sortable: false
            },{
                text: "Author",
                dataIndex: 'username',
                width: 100,
                hidden: true,
                sortable: true
            },{
                text: "Replies",
                dataIndex: 'replycount',
                width: 70,
                align: 'right',
                sortable: true
            },{
                id: 'last',
                text: "Last Post",
                dataIndex: 'lastpost',
                width: 150,
                renderer: renderLast,
                sortable: true
            }],
            // paging bar on the bottom
            bbar: Ext.create('Ext.PagingToolbar', {
                store: store,
                displayInfo: true,
                displayMsg: 'Displaying topics {0} - {1} of {2}',
                emptyMsg: "No topics to display",
                items:[
                    '-', {
                    text: 'Show Preview',
                    pressed: pluginExpanded,
                    enableToggle: true,
                    toggleHandler: function(btn, pressed) {
                        var preview = Ext.getCmp('gv').getPlugin('preview');
                        preview.toggleExpanded(pressed);
                    }
                }]
            }),
            renderTo: 'topic-grid'
        });
    
    
        // trigger the data store load
        store.loadPage(1);
    Last edited by slemmon; 17 Apr 2013 at 3:35 PM. Reason: Added inline test case

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,138
    Vote Rating
    188
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    Cornelio Procopio, PR, Brazil
    Posts
    8
    Vote Rating
    2
    diogo.arenhart is on a distinguished road

      0  

    Default


    Any workaround to fix it?
    All my grouping grids with paging toolbar are with this problem.

    Thank you.

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    Cornelio Procopio, PR, Brazil
    Posts
    8
    Vote Rating
    2
    diogo.arenhart is on a distinguished road

      0  

    Default


    Using today's nightly build (ext-4.2.1.792) the selection bug seems to be corrected, but it has a new bug related with the horizontal scrollbar.

    All grids with a flex column and a vertical scrollbar (more items than the view can show) also are showing an unnecessary horizontal scrollbar.

Thread Participants: 1

Tags for this Thread