:: Forum >>

Grid in Tree-Node ( Moz & FF issues) ....

Alex, when trying to inject grids into Tree Items I found some issues about:
- scrollBars ( size in Moz 1.75 & disabled in FF 2.0)
- row/cell selection ( both)
- columns-resizing (not possible - both)
( IE is OK)
This is the testing Code:
Thanks,
<script>
var obj = new AW.UI.Grid;
obj.setId('Mygrid');
obj.setCellText(function(i, j){return 'FirstGrid -' + j + "-" + i});
obj.setHeaderText(function(i){return i});
obj.setRowCount(10);
obj.setColumnCount(5);
obj.setControlSize(300, 90); // width, height
//////////////////
var obj2 = new AW.UI.Grid;
obj2.setId('Mygrid2');
obj2.setCellText(function(i, j){return 'SecondGrid -' + j + "-" + i});
obj2.setHeaderText(function(i){return i});
obj2.setRowCount(10);
obj2.setColumnCount(5);
obj2.setControlSize(300, 90); // width, height

var treeText = ["", "Home", "Favorites", obj.toString(), obj2.toString()];
var treeImage = ["", "home", "favorites"];
var treeView = {0:[1, 2], 1:[3], 2:[4]};

var tree = new AW.UI.Tree;
tree.setId("tree1");
tree.setItemText(treeText);
tree.setItemImage(treeImage);
tree.setViewCount(function(i){return treeView[i] ? treeView[i].length : 0});
tree.setViewIndices(function(i){return treeView[i]});
tree.setControlSize(400, 300); // width, height

for (var r=1;r<tree.getViewIndices(0).length+1;r++){
for (var t=0;t<tree.getViewIndices(r).length;t++){
tree.getItemTemplate([tree.getViewIndices(r)[t]]).setContent("box/sign", '');
tree.getItemTemplate([tree.getViewIndices(r)[t]]).setStyle('height', 100);
}
}

tree.onItemClicked = function( event, row){ return 1; }

document.write(tree);
</script>
Carlos
Saturday, November 11, 2006
Nevermind, I figured it out.
- raiseEvent("adjustScrollBars");
- setVirtualMode(false);
- capturing ,mouseover/click on headers.
Thanks Anyway
Carlos
Friday, November 17, 2006
Carlos,

You the man...!!! :)
Thanks for the grid control code. I been struggling with this aspect.

The response on this forum is really very "prompt".

Jaydeep Deshmukh
Monday, November 20, 2006

This topic is archived.


Back to support forum

Forum search