How to retrieve Multiple Selected Nodes from Smart GWT Tree Grid
I am constructing a Tree Grid using the below approach (Sample Code)
TreeGrid treeGrid = new TreeGrid() Tree tree = new Tree(); treeGrid.setData(tree)
TreeNode newNode = new TreeNode(); newNode.setTitle("a1"); newNode.setID("a1Id"); tree.add(newNode, NAVPATH_ROOT); //(and So on I am adding multiple nodes)
The user of this tree will be able to select multiple Tree Node. But I am unable to retrieve all the selected nodes. There is a method called getSelectedRe开发者_如何学Ccord which retrieves only one selected record. Is there any method like getSelectedRecords() or getSelectedNodes() which will give all the selected nodes? your help in this is much appreciated. Thanks, Vamsi
You need to use ListGrid.getSelection() for that. http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/grid/ListGrid.html#getSelection()
精彩评论