Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

[Bug] Scrolling horizontally in TreeGrid with scrollbars

$
0
0
There is a bug in scrolling TreeGrid that happens after scrolling to the end and sorting.

To replicate: run code below in any of your demo examples, scroll all the way to the right, pick "Sort Descending" from drop down menu for column 18, then try scrolling to the end again - it does not work, can not see values for the column 19 (last column). If this doesn't replicate the problem - pick "Clear Sort" and pick "Sort Descending" again.

Code:

        var root = {
                        children: [{
                                0: 'rootData',
                                children: []
                        }]
                },
                rootData = root.children[0],
                row,
                fields = [],
                folders = 5,
                leafs = 5,
                allCols = 20,
                displayCols = 20;

        for(var i=0; i<folders; i++){
                var children = (
                        rootData.children[i] = {
                                0: 'child' + i,
                                children: []
                        }
                        ).children;
                for(var j=0; j < leafs; j++) {
                        row = children[j] = {};
                        for (var k = 0; k < allCols; k++) {
                                row[k] = i+j;
                                if(k>0) root.children[0][k] = rootData.children[i][k] = i+j;
                        }
                }
        }

        for(var i=0; i<displayCols; i++){
                fields.push({name: ''+ i, align:"right"});
        }

        var treeGrid = isc.TreeGrid.create({
                width: 500,
                height: 300,
                autoDraw: true,
                autoFitFieldWidths: true,
                autoFitWidthApproach: "both",
                data: isc.Tree.create({
                        root: root
                }),
                fields: fields
        });

        treeGrid.data.openAll();


Viewing all articles
Browse latest Browse all 4756

Trending Articles