UI: making the tree comp work with the grid

Hi all(first time poster),
I’m building a UI and just started programming. I’m trying to get a tree component to coincide with a datagrid component… the tree uses xml data using xml connector, the tree has nodeOpen listener but I’m having trouble initalizing the data grid and having it display which node of the tree is currently selected. Any help and explaination would be helpful. My code so far:

[SIZE=1]//Listener object attached to the datagrid to listen for changes made
var listenPress:Object = new Object ();
listenPress.cellEdit = function () {
trace (“time to save”);
};
myDataGrid.addEventListener (“cellEdit”, listenPress);
//
//XML data connected with Tree using XML connector
var xmlListen:Object = new Object ();
//
xmlListen.result = function (result) {
treeComp.dataProvider = result.target.results;
};
xmlCon.addEventListener (“result”, xmlListen);
xmlCon.trigger ();
//
//Listener object attached to the Tree to listen for folder selection
var treeListen:Object = new Object ();
treeListen.nodeOpen = function () {
trace (“display this data in grid”);
};
treeComp.addEventListener (“nodeOpen”, treeListen);
//
[/SIZE]

o_O verg