SmartGWT version 2.4
GWT version 2.1.0
Great product!
I have created a TreeGrid with selection appearance CHECKBOX
// relevant code
TreeGrid treeGrid = new TreeGrid();
treeGrid.setShowPartialSelection(true);
treeGrid.setSelectionProperty("selected");
treeGrid.setShowRoot(false);
Tree tree = new Tree();
tree.setModelType(TreeModelType.PARENT);
tree.setIdField("id");
tree.setNameProperty("name");
tree.setParentIdField("parent");
tree.setOpenProperty("isOpen");
tree.setShowRoot(false);
// create a bunch of TreeNodes in treeNodeList
// with the correct attributes to form a tree
// this part works.
List<TreeNode> treeNodeList = new ArrayList<TreeNode>();
// add nodes to list
TreeNode[] nodes = new TreeNode[treeNodeList.size()];
treeNodeList.toArray(nodes);
// create and configure TreeNode sectionNode
tree.setRoot(sectionNode); // root created elsewhere & not displayed
tree.setData(nodes);
treeGrid.setData(tree);
The TreeNodes display correctly and respond appropriately when there is a partial selection due to user interaction.
However, if the initial state of the tree includes a partially selected tree, the parent node shows fully selected instead of partially selected.
Is there a way to work around this in the currently released version?
Thanks.
GWT version 2.1.0
Great product!
I have created a TreeGrid with selection appearance CHECKBOX
// relevant code
TreeGrid treeGrid = new TreeGrid();
treeGrid.setShowPartialSelection(true);
treeGrid.setSelectionProperty("selected");
treeGrid.setShowRoot(false);
Tree tree = new Tree();
tree.setModelType(TreeModelType.PARENT);
tree.setIdField("id");
tree.setNameProperty("name");
tree.setParentIdField("parent");
tree.setOpenProperty("isOpen");
tree.setShowRoot(false);
// create a bunch of TreeNodes in treeNodeList
// with the correct attributes to form a tree
// this part works.
List<TreeNode> treeNodeList = new ArrayList<TreeNode>();
// add nodes to list
TreeNode[] nodes = new TreeNode[treeNodeList.size()];
treeNodeList.toArray(nodes);
// create and configure TreeNode sectionNode
tree.setRoot(sectionNode); // root created elsewhere & not displayed
tree.setData(nodes);
treeGrid.setData(tree);
The TreeNodes display correctly and respond appropriately when there is a partial selection due to user interaction.
However, if the initial state of the tree includes a partially selected tree, the parent node shows fully selected instead of partially selected.
Is there a way to work around this in the currently released version?
Thanks.
Comment