jQuery UI Widgets Forums TreeGrid Missing Scollbar in TreeGrid

This topic contains 2 replies, has 2 voices, and was last updated by  Matthias 8 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Missing Scollbar in TreeGrid #86778

    Matthias
    Participant

    Im using a TreeGrid in a div of a fixed size. So a part of my tree is missing, because the content ist bigger then the left space. I would expect a scrollto be shown to see the rest of my data, but there is no scrollbar. I using following code:

    
            var source =
            {
                dataType: "json",
                dataFields: [
                    { name: 'id', type: 'number' },
                    { name: 'key', type: 'string' },
                    { name: 'header', type: 'boolean' },
                    { name: 'value', type: 'string' },
                    { name: 'children', type: 'array' }
                ],
                hierarchy:
                {
                    root: 'children'
                },
                id: 'id',
                localData: this.data
            };
            var cellClass = function (row, dataField, cellText, rowData) {
    
                let res = '';
                if (rowData.header)
                    res = 'treeTabHeader ' 
                if (rowData.level == 0) {
                    return res + "bg10";
                }
                if (rowData.level == 1) {
                    return res + "bg09";
                }
                if (rowData.level == 2) {
                    return res + "bg08";
                }
                if (rowData.level == 3) {
                    return res + "bg07";
                }                
                return res + "bg06";
            }            
            let jq: any = $;            
            var dataAdapter = new jq.jqx.dataAdapter(source);
            // create Tree Grid
            let jqo: any;
            jqo = $("#objectDetail");
            jqo.jqxTreeGrid(
            {
                showHeader: false,
                pageable: true,
                pageSize: 1,
                pageSizeMode: 'root',  
                pagerPosition: 'top',                  
                source: dataAdapter,
                columns: [
                    { text: 'key', dataField: 'key', resizable: true, cellClassName: cellClass, cellsRenderer: function (row, column, value, rowData) {
                        var html = '';
                        html += '<span title="'+rowData.key+'">'+rowData.key+'</span>';
                        return html;
                    }},
                    { text: 'value', dataField: 'value',resizable: true, cellClassName: cellClass}
                ]
            });  
    
    Missing Scollbar in TreeGrid #86780

    Peter Stoev
    Keymaster

    Hi Matthias,

    TreeGrid’s scrollbars are displayed when its width or height properties are set. If they are not set, the width and height are automatic. This means that if the content overflows, what’s visible and what’s not depends on the upper HTML Element in the DOM and how you set it up.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Missing Scollbar in TreeGrid #86808

    Matthias
    Participant

    I set height to 100%. After positioning the containing div absolute I got the scrollbar.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.