Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TreeGrid scrolling and adding as member bugs

    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

    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);
    };

    #2
    Thanks for the report. We see the issue and are investigating.

    Regards
    Isomorphic Software

    Comment


      #3
      We've made a change to address the first issue. This will be present in the next nightly build (dated Aug 28 or above).

      On the second issue - the fact that the scroll position is jumping back to zero when you change the parent of the grid (clear, change parent, draw) is noted. We agree it would be neater if it remembered your scroll position and we will be looking at what's involved to achieve this in the near future.

      The second part of this second issue - where things are not properly rendered in both parts of the grid - should also be resolved - please let us know if this persists.

      Thanks
      Isomorphic Software

      Comment


        #4
        The first problem (last row scrolling) is resolved, thanks

        The second part of the second issue - where things are not properly rendered seems to still have the same problem, after popping out then scrolling down then re-attaching to previous parent still only shows tree column part and not the rest (until I scroll or resize column or expand/collapse)

        Comment


          #5
          Any idea about this last issue? Seems to still be present in latest version.

          Comment

          Working...
          X