There seems to be 2 bugs with TreeGrid
Tested on Windows 7 with latest Firefox and Chrome
1. Scrolling bug - only in 10.0d, not in 9.1
When tree column is locked, showCustomScrollbars: false, and there is no horizontal scrollbar visible - if I scroll all the way down - last row only shows tree column cell and not the rest of cells. If I resize column - last row shows up again. And if I select one row before the last row and hit down arrow to navigate to last row - the row does show but tree column cell missmatches the other cells. If showCustomScrollbars: true - then everything works fine.
You can test with my code sample below.
2. Removing/adding as member -in both 10.0d and 9.1
In the code sample below I create VLayout with Window as member that has TreeGrid as item. I overwrote maximize/restore to de-parent Window with TreeGrid to maximize it to full screen. If I scroll TreeGrid down before maximizing, then hit maximize - it takes the whole screen just fine, however the scroll position is lost and is reset to 0. Then if I scroll in maximized grid down and hit restore to add Window with TreeGrid back to VLayout - not only scroll position is reset to 0 but also the grid shows only tree column parts of records and not the other cells - until I scroll or resize column - at which point the records show up again
Tested on Windows 7 with latest Firefox and Chrome
1. Scrolling bug - only in 10.0d, not in 9.1
When tree column is locked, showCustomScrollbars: false, and there is no horizontal scrollbar visible - if I scroll all the way down - last row only shows tree column cell and not the rest of cells. If I resize column - last row shows up again. And if I select one row before the last row and hit down arrow to navigate to last row - the row does show but tree column cell missmatches the other cells. If showCustomScrollbars: true - then everything works fine.
You can test with my code sample below.
2. Removing/adding as member -in both 10.0d and 9.1
In the code sample below I create VLayout with Window as member that has TreeGrid as item. I overwrote maximize/restore to de-parent Window with TreeGrid to maximize it to full screen. If I scroll TreeGrid down before maximizing, then hit maximize - it takes the whole screen just fine, however the scroll position is lost and is reset to 0. Then if I scroll in maximized grid down and hit restore to add Window with TreeGrid back to VLayout - not only scroll position is reset to 0 but also the grid shows only tree column parts of records and not the other cells - until I scroll or resize column - at which point the records show up again
Code:
var root = { children: [{ 0: 'rootData', children: [] }] }, rootData = root.children[0], row, fields = [], folders = 10, leafs = 100, allCols = 20, displayCols = 3; 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] = j + 1; } } } for(var i=0; i<displayCols; i++){ fields.push({name: ''+ i, width: 150}); } fields[0].frozen = true; var treeGrid = isc.TreeGrid.create({ showCustomScrollbars: false, data: isc.Tree.create({ root: root }), fields: fields }); treeGrid.data.openAll(); var _window, _layout = isc.VLayout.create({ width:500, height: 200, border: 5, autoDraw: true, members:[ _window = isc.Window.create({ width: "100%", height: "100%", title: "Click maximize to de-parent, then scroll vertically, then restore to re-parent", showMaximizeButton:true, items:[ treeGrid ] }) ] }); _window.maximize = function(){ _window.deparent(); _window.draw(); this.Super("maximize", arguments); }; _window.restore = function(){ _layout.addMember(_window); this.Super("restore", arguments); };
Comment