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.
-
Author
-
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} ] });
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 StoevjQWidgets Team
http://www.jqwidgets.comI set height to 100%. After positioning the containing div absolute I got the scrollbar.
-
AuthorPosts
You must be logged in to reply to this topic.