Tree control's nodes and ites position

Hello,
Is there a way to get tree's nodes and items position,or
get it by ElementVisualizationMode and Hit event ?
Thanks,
Assaf

Hi
Using the new features, and I think I have found a bug that I was wondering if anyone else can comment on.
GetNodeLeft(BSTR key) ... perfect
GetNodeTop(BSTR Key) ... perfect
GetNodeHeight(BSTR Key) ... perfect
BUT
GetNodeWidth(BSTR Key) ... returns weird values, except for the first item in the tree.
The function then returns what seems to be:
(Control Width - (Height * Absolute Position))
The deeper one goes into the tree, the smaller the width becomes ...
Surely this is a bug ....

Similar Messages

  • Tree control with Nodes in ALV

    Hi ABAP Gurus,
    I am trying to create tree control with nodes in ALV. I have referred to standard BCALV_TREE* programs but new to OO programming. Not sure as to how I can display my internal table data than the SFLIGHT information in these programs. Can you please let me know how this can be done or if I can use any ALV function modules for the node display.
    thanks,
    Chaitanya

    Maybe you could use this.  Call this VI from a Value Change event of the tree.
    Attachments:
    Check_Tree_Items.vi ‏28 KB

  • Tree Control Property Node for Accessing "Child Text" String Array

    When adding items to a tree control using the EditTreeItems invoke nodes, the inputs include "Child Tag", "Item Indent", "Child Only?", "Glyph Index", "Child Text", and "Left Cell String" as can be seen in this screenshot.
    There are property nodes for the tree control for accessing each of these elements, except for the "Child Text", which is an array of strings. It is possible to access this data as outlined in this forum post, but this method is somewhat involved and round about. 
    I suggest that a property for the Tree class be created to access the Child Text array directly.

     The work around only works if you do not have an empty string element some where in the middle.
    At lest could the "Active Celltring Property" read return an error when you have gone beyond the end of the array.

  • Save Labview tree Control to file and Load from file

    I want to save all of the information from my Labview (8.2) tree control to a file and be able to read it back from a file and re-populate the tree control.  I am using different symbols as well as multiple columns and level of children in my control.  Does anyone have any suggestions on how to do this?
    Thanks
    Steve M.
    Attachments:
    tree pic.jpg ‏60 KB

    Hi Steve,
    I found a DF that talks about saving the tree to a spreadsheet file and have included it in this message.  To get items from the tree control, you have to use open up the tree and remove all of the items off of that tree, while still preserving the heirarchy of the tree.  The indent level property node will preserve the heirarchy of the tree and from there you can get the item tag and cell string. 
    To transfer the file to a tree, you will then need to read the file and insert items into the tree corresponding to the heirarchy.  I have also found a tutorial on how to traverse tree controls.
    I hope this helps.
    Regards,
    Nadim
    Applications Engineering
    National Instruments

  • Tree control parent node label

    The following code works fine (except the part in caps, which
    isn't code). Suggestions?
    private function changeEvt(event:Event):void {
    var theData:String = ""
    if (event.currentTarget.selectedItem.@value) {
    theData = " Data: " +
    event.currentTarget.selectedItem.@value;
    trace(event.currentTarget.selectedItem.@label + theData);
    //trace(NEED PARENT NODE LABEL HERE IF IT EXISTS);
    }

    OK. So I stopped looking too soon. In my case:
    trace(browserTree.selectedItem.parent().@label);

  • Not able to get the database data into the Tree Control

    Hi Everybody,
                        I have to populate the tree control with nodes and items, which is to be populated from the database, and the tree control is <b>dynamic</b>. I mean, there is a <b>toolbar</b>, whenever a <b>pushbutton is clicked</b>, depending on that the tree contents has to be changed.
    If anybody had worked with <b>CL_GUI_COLUMN_TREE</b> control to get the data from database, depending upon the <b>pushbutton selected in Toolbar</b>, please paste the seudocode for it.
    Regards,
      Abdul,
    Intelligroup.
    P.S: Helpful answers will be rewarded.

    have you seen this demo program
    SAPCOLUMN_TREE_CONTROL_DEMO
    Regards
    Raja

  • How can I drag and drop an item from one Tree control to another in LabVIEW 7.1?

    You can use the mouse up and down event on the two tree controls but the problem is making the correct selection in the second tree control. I want to be able to switch over to the selection bar of the second tree control so that I can place my item in the correct position. I know all possible workarounds with double-clicks and so on... but I really want a windows drag and drop.
    This is what I have for the moment. Please check the library below. I need to activate the selection bar of the second tree control somehow to get the position in the control. The VI below is written in LV 7.1
    Attachments:
    Drag&Drop.llb ‏65 KB

    Hi Jones,
    As far as I know this feature is currently not supported by the Tree control. A workaround, would be to use the vertical position of the mouse in the button up event to determine what line you�re dropping the item.
    If you would like the Tree control to include the drag and drop feature, please submit this as a Product Suggestion under the feedback at www.ni.com/contact.
    Good luck!
    Best regards,
    Philip C.
    Applications Engineer
    National Instruments
    www.ni.com/ask
    - Philip Courtois, Thinkbot Solutions

  • Control horizontal and Vertical position of a line ..

    Hello,
    triying to fulfill the requirments on the diagramm of a dashboard, i need to control the vertical and horizontal position of a Line (for example). depending on a calculated formula the line should be 10 mm from Top and 10mm from left (for example).
    Do anybody have an idea how realize it .. ?
    Thanks

    If there is just two positions: just make two lines and flip the visibility.
    If there are multiple positions: make a line chart. Do not show the markers and remove all further stuff (no mouseovers, axes gone, backgrounds gone etcetera) and just add a series. Now change either the scale of the axes according to your distance thresholds or change the value of the datapoints.

  • Controlling window size and positioning in RH8 WebHelp

    Evening all,
    I've seen a post before about controlling the size and/or positioning or RH WebHelp windows, but I haven't been able to find it again.
    I'm generating WebHelp in RH8 and at this point am using the default skin and whatever default tri-pane and CSH windows RH chooses to use.
    Question is: how do I control the size and position of these windows? Or can I?
    I suspect they're set in a .js, but don't know which one. I know I can create new windows, and if I recall correctly, I can make one for CSH and one for the classic tri-pane help display. Is this how folks typically control the windows used to display RH content? Or do they muck about in the original .js files?
    Or, and this is the more likely, am I just being too anal-retentive about this and I should just let RH do its default thing and not worry about it?
    Thanks - I'm just a bit confused here,
    Patrick

    Hi Patrick
    If you aren't working with a programmer to connect your WebHelp to an application, you really don't have much control over the placement and attributes that are used.
    Note that when you create a project in RoboHelp HTML, you have an ability to create a WebHelp window with the desired attributes. But really, all that does is configure the way a window will open if you are using something called the "WebHelp API" to open topics. As you stated earlier, JavaScript is actually used by the API to open the window.
    Cheers... rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Report with Dynamic tree control

    I have a report with a TREE CONTROL.
    <p>
    A Tree is referenced to: CL_GUI_ALV_TREE_SIMPLE and is located on the left side of the screen.
    <p>
    See diagram below.  The Tree has MULTI-LEVEL nodes and the user can click on any of the nodes which will
    trigger a report (rellevant for that node) to appear in the REPORT container.
    <p>
    Everythign is working fine. 
    <p>
    I now have a requirement to add a TREE ON/OFF functionality.  I have added this by 'Freeing' TREE
    container and by initializing when the user Turns ON the TREE.  It is working fine, HOWEVER, when
    it initilizes the TREE it is COLLAPSED and obviously does not point to the NODE that was clicked.
    <p>
    My goal is to retain the value of the NODE that was pressed and EXPAND the tree to that node and
    highlight it...  Please note that I have MULTI-LEVEL nodes and the user can double click on NODES
    and ITEMS. 
    <p>
    I tried using GET_SELECTED_NODES, but it only works if the user selects the LOWEST level node/item.
    <p>
    Any advise will be appreciated.
    <p>
    Also, as an alternative, I was thinking of resizing TREE container to WIDTH of 1 when the user PRESSES
    TREE OFF and resizing back to width 200 when the user presses TREE ON.  I could not find any methods
    that would work with CL_GUI_DOCKING_CONTAINER. 
    Please help! Thank you in advance.
    <br>
    <br>
    <img src="http://img237.imageshack.us/img237/6684/bdccz3.jpg" border="0"/></a>
    <p>
    <p>

    I have a report with a TREE CONTROL.
    <p>
    A Tree is referenced to: CL_GUI_ALV_TREE_SIMPLE and is located on the left side of the screen.
    <p>
    See diagram below.  The Tree has MULTI-LEVEL nodes and the user can click on any of the nodes which will
    trigger a report (rellevant for that node) to appear in the REPORT container.
    <p>
    Everythign is working fine. 
    <p>
    I now have a requirement to add a TREE ON/OFF functionality.  I have added this by 'Freeing' TREE
    container and by initializing when the user Turns ON the TREE.  It is working fine, HOWEVER, when
    it initilizes the TREE it is COLLAPSED and obviously does not point to the NODE that was clicked.
    <p>
    My goal is to retain the value of the NODE that was pressed and EXPAND the tree to that node and
    highlight it...  Please note that I have MULTI-LEVEL nodes and the user can double click on NODES
    and ITEMS. 
    <p>
    I tried using GET_SELECTED_NODES, but it only works if the user selects the LOWEST level node/item.
    <p>
    Any advise will be appreciated.
    <p>
    Also, as an alternative, I was thinking of resizing TREE container to WIDTH of 1 when the user PRESSES
    TREE OFF and resizing back to width 200 when the user presses TREE ON.  I could not find any methods
    that would work with CL_GUI_DOCKING_CONTAINER. 
    Please help! Thank you in advance.
    <br>
    <br>
    <img src="http://img237.imageshack.us/img237/6684/bdccz3.jpg" border="0"/></a>
    <p>
    <p>

  • Populate flex tree control on demand using HTTPService (Flex 3)

    First, I am sorry if the same post is already posted here but after spending 30 minutes or may be more I could not find the solution.
    By the way I have two problems. 1.) I am new to flex which I know if my own problem and soon I will handle it.
    2.) This is major problem for me. I have to populate Tree control from database and I used HTTPService to get the data from database.
    I created a object of HTTPService and on load of Tree control I am calling a function which calls the HTTP URL and returns me the first level of node for my Tree.
    When I click on any node a function is called again using HTTPService and result is appended to the currently selected node. The same goes until n level and it works fine. I was happy with my results. I am stuck in new problem. The problem is if the tree is already populated on my browser and I make some add/update/delete any node or child node, the flex doesn't make a call to HTTP URL and I am not getting updated data.
    The mxml code is below (this code has some extra things too).
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="vertical"  backgroundGradientAlphas="[1.0, 1.0]"
    backgroundGradientColors="[#000000, #868686]" >
    <mx:Script>
      <![CDATA[
       import mx.utils.StringUtil;
       import mx.rpc.http.HTTPService;
       import mx.events.ListEvent;
       import mx.binding.utils.BindingUtils;
       import mx.controls.Alert;
       import mx.rpc.events.FaultEvent;
       import mx.collections.XMLListCollection;
       import mx.utils.ObjectProxy;
       import mx.collections.ArrayCollection;
       import mx.rpc.events.ResultEvent;
       import mx.utils.ArrayUtil;
       [Bindable]
       public var datalist:XMLListCollection = new XMLListCollection();
       [Bindable]
       public var xmlFromDatabase:HTTPService=new HTTPService();
       [Bindable]
       private var xmlForChildren:HTTPService;
       private function resultHandler( event:ResultEvent ):void
           var x:XML = event.result as XML;   
           var xl:XMLList = XMLList( x );
       private function faultHandler( event:FaultEvent ):void
        Alert.show(event.message.toString());
       private function display():void
        var params:Object = {};
        params["parent"] = "0";
        xmlFromDatabase.url = "http://localhost:8080/GrailsFlex/department/tree";
        xmlFromDatabase.method = "GET";
        xmlFromDatabase.resultFormat = "e4x";
        xmlFromDatabase.useProxy = false;
        xmlFromDatabase.send(params);
        xmlFromDatabase.addEventListener(ResultEvent.RESULT,displyTree,false,0,false);
       private function displyTree(event:ResultEvent):void
        XMLtree1.dataProvider =  event.result;
        XMLtree1.labelField = "@name";
       private function getChilds(event:ListEvent):void
        try
         var xmlTree:Tree = event.currentTarget as Tree;
         var node:XML = xmlTree.selectedItem as XML
         var params:Object = {};
         params["parent"] = node.@id;
         xmlForChildren = new HTTPService();
         xmlForChildren.url = "http://localhost:8080/GrailsFlex/department/tree";
         xmlForChildren.method = "GET";
         xmlForChildren.resultFormat = "e4x";
         xmlForChildren.useProxy = false;
         xmlForChildren.send(params);
         xmlForChildren.addEventListener(ResultEvent.RESULT,appendChild,false,0,false);
         xmlForChildren.addEventListener(ListEvent.ITEM_CLICK,getChilds,false,0,false);
        catch (E:Error)
         Alert.show("getChilds Error:-- " + E.message);
       private function deleteTreeNode(xmlItem:XML):void
        var xmlParent:XML = XML(xmlItem).parent();
        if (xmlParent.@parent == null || StringUtil.trim(xmlParent.@parent) == "")
         xmlParent.@parent = "0";
        if (xmlParent.@parent != "0")
         //Recursive call until I get reach to children of root node
         deleteTreeNode(xmlParent);
        else
         // Now I am at root.
         var xmlRoot:XML = XML(xmlParent).parent();
         var bActualRoot:Boolean = false;
         if (xmlRoot == null)
          xmlRoot = xmlParent;
          bActualRoot = true;
         if (bActualRoot)
          if (xmlRoot.@parent == "0")
           try
            for each (var xl:XML in xmlParent.children())
             if (xl.@name != xmlItem.@name)
              for (var cn:int=xl.children().length()-1; cn >=0; cn--)
               delete xl.children()[cn];
           catch (ex:Error)
            Alert.show("error Real Root: " + ex.toString());
         else
          for each (var nodexm:XML in xmlRoot.children() )
           if (nodexm.@name != xmlParent.@name )
            try
             for (var cu:int=nodexm.children().length()-1; cu >=0; cu--)
              delete nodexm.children()[cu];
            catch (ex:Error)
             Alert.show("error No Real Root: " + ex.toString());
       private function appendChild(event:ResultEvent):void
        var node:XML = event.result as XML
        var sItem: XML = XMLtree1.selectedItem as XML;
        if (sItem.children().length() > 0)
         delete sItem.children();
        for(var i:int=0; i < node.children().length(); i++)
                        var item:XML = node.children()[i];
                        XMLtree1.selectedItem.appendChild(item);
                        XMLtree1.expandItem(XMLtree1.selectedItem,true,true);
        deleteTreeNode(XML(XMLtree1.selectedItem));
      ]]>
    </mx:Script>
    <mx:Tree id="XMLtree1" width="350" height="470"
          showRoot="false" creationComplete="display()" itemClick="getChilds(event)"  />
    </mx:Application>
    Thanks in advance

    Thanks buddy for the answer.
    Unfortunately the answer came after quite long time of posting the message. Anyway I was able to open a tree on demand using HttpService and due to my new requirement I changed it to RemoteObject.
    I my latest change I am able to populate tree nodes on demand and also the same solution if getting update from server via JMS using Consumer object.
    I kind a like this solution because it took me good amount of effort to find the right solution.
    If any one is intersted the he/she can reply to the post and I can provide code here or may at some location so that it can be easily downloaded.
    The solution is Flex-Grails combination.
    Thanks everybody.

  • Check Box in Tree Control

    I found that the oracle installation is using tree control with check box. I tried to use the same feature in my application. But I found that the tree control in swing and infoswing is not having the feature to add checkbox in the tree control. If anybody knows how to add checkbox in the tree control using the jdeveloper please help me.

    You can see how to do it the next link http://www2.gol.com/users/tame/swing/examples/JTreeExamples2.html
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by S. Arun ([email protected]):
    I found that the oracle installation is using tree control with check box. I tried to use the same feature in my application. But I found that the tree control in swing and infoswing is not having the feature to add checkbox in the tree control. If anybody knows how to add checkbox in the tree control using the jdeveloper please help me.<HR></BLOCKQUOTE>
    null

  • Plumtree Tree Control

    How do I use the plumtree tree control to display structured data in a portlet?

    Stuart,
    I assume that you are using the EDK Web Controls package - it's a separate download from the .NET EDK, but I expect you are otherwise it would have been difficult to get it to work at all.
    I have managed to get this tree control to work, and these are the steps I took:
    Moved all images to the imageserver & changed the image base in the control to point to the location on the image serverMoved the htc file to the portal server and changed the webapp to point at this (you cannot put this on the image server as cross-site scripting security prevents this). This you can do in web.config.Each time the control didn't work I checked the html source to see if there were any links that were broken. I never had a problem with specific browsers though - it seemed to always work on IE, and always look bad on anything else!
    Also make sure you're using the EDK Web Controls 2.1 (not beta) - any older than this will not work.
    Jonathan

  • JSF tree view GUI component and tree node actions

    Hi,
    I am new in using JSF and have a problem with my simple test application.
    The application contains a tree view control with one static tree node and a separate text area. Clicking on the tree node shall fill the text area with the string 'hello'. Seems to be very simple, but it doesn't work.
    What did I do?
    First of all I use the Sun Java Studio Creator 2.
    By double clicking on the tree node in the design window of the IDE a method called treeNode1_action() was created. I also added the String text to the session bean. treeNode1_Action() does not more than setting text='hello' ( getSessionBean().setText('hello'); ).
    The jsp file contains the line
    <ui:textArea binding="#{Page1.textArea}" id="textArea" style="height: 192px; left: 360px; top: 48px; position: absolute; width: 456px" text="#{SessionBean1.text}"/>, so the text of the text area is bound to the session property 'text'.
    Running the application and clicking on the tree node does nothing except reloading the page (no 'hello' inside the text area).
    Using the debugger showed me that the bean property text is set correctly to 'hello', also after reloading the page.
    What did I do wrong?
    What do I have to do to display 'hello' in the text area?
    I would be glad for some good advice to solve my problem and looking forward for an answer.
    Regards from germany
    Matthias

    want to remove the green patch from the jsf tree componentas u said ,, it is COMPONENET so this is a pre-made creator component that u cant chnage its attributes ,,
    instead u can extract Theam.jar file and change the icons ,, u i didnt do it before ,, but u may be find what u want there,
    hope this will help
    good luck
    Mohammed

  • Issue : drag and drop from list control to tree control

    Hi,
    I was trying a drag and drop from list control to tree control. I have used some sample data to populate list and tree controls .
    It is working fine . except one problem ..
    Prob : when i drag an item to tree control .. it gets added .. now tree contains (X+1) data in list .. say X is the inital number of nodes in a tree node.
              now if i drag another item from list to last item in the tree node  .. i.e at X+1 index. .. it throws null pointer exception.
    I am considerably new in flex programming . looking for help from experts ..
    Below is my code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="horizontal"
                    creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import mx.controls.listClasses.IListItemRenderer;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.utils.ObjectUtil;
                import mx.collections.ICollectionView;
                import mx.core.UIComponent;
                import mx.managers.DragManager;
                import mx.events.DragEvent;
                import mx.controls.Alert;
                import mx.controls.Label;
                import mx.events.CloseEvent;
                private var homePath:String="/home/e311394/dndTest/";
                private var destPath:String="/home/e311394/dndDest/";
                private var eid:String="e311394";
                private var actn:String;
                [Bindable]
                private var cm:ContextMenu;
                private var cmi:ContextMenuItem;
                [Bindable]
                private var dp:ArrayCollection;
                private function init():void
                    cmi=new ContextMenuItem("Remove");
                    cmi.enabled=true;
                    cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_menuItemSelect);
                    cm=new ContextMenu();
                    cm.hideBuiltInItems();
                    cm.customItems=[cmi];
                    cm.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenuItem_menuSelect);
                    list.contextMenu=cm;
                private function contextMenuItem_menuSelect(evt:ContextMenuEvent):void
                    list.selectedIndex=lastRollOverIndex;
                private function contextMenuItem_menuItemSelect(evt:ContextMenuEvent):void
                    var loclSelectedRow:Object=list.selectedItem;
                    var lostrSelectedMenuItem:String;
                    lostrSelectedMenuItem=evt.target.caption;
                    if (loclSelectedRow != null)
                        var obj:Object=new Object()
                        obj.label=loclSelectedRow.label as String;
                            //Alert.show(obj.label);
                    if (lostrSelectedMenuItem == "Remove")
                        if(loclSelectedRow!=null)
                        var pth:String=homePath.concat(loclSelectedRow.label);
                        //Alert.show(pth);
                        //FlexDnDRemoteService.process(eid,"delete",pth,"-"); 
                        var coll:ArrayCollection=list.dataProvider as ArrayCollection;
                        if (coll.contains(loclSelectedRow))
                            coll.removeItemAt(coll.getItemIndex(loclSelectedRow));
                public function onTreeDragEnter(event:DragEvent):void
                    event.preventDefault();
                    DragManager.acceptDragDrop(event.target as UIComponent);
                    tree.showDropFeedback(event);
                protected function onTreeDragOver(event:DragEvent):void
                    event.preventDefault();
                    event.currentTarget.hideDropFeedback(event);
                    try
                        var index:int=tree.calculateDropIndex(event);
                    catch (e:Error)
                        DragManager.showFeedback(DragManager.NONE);
                        return;
                    tree.selectedIndex=index;
                    var draggedOverItem:Object=tree.selectedItem;
                public function onTreeDragExit(event:DragEvent):void
                    event.preventDefault();
                    tree.hideDropFeedback(event);
                private function showAlert():void
                    Alert.yesLabel="Move";
                    Alert.noLabel="Copy";
                    Alert.buttonWidth=70;
                    Alert.show("Copy / Move ?", "Confirm", Alert.YES | Alert.NO | Alert.CANCEL, this, alertListener, null, Alert.OK);
                private function alertListener(eventObj:CloseEvent):void
                    var result:Boolean=false;
                    if (eventObj.detail == Alert.CANCEL)
                        //Alert.show("CANCEL");
                        return;
                    if (eventObj.detail == Alert.YES)
                        //Alert.show("YES");
                        result=true;
                    else if (eventObj.detail == Alert.NO)
                        //Alert.show("NO");
                        result=false;
                    var index:int=tree.calculateDropIndex(treedropevt);
                    //Alert.show("Drop Pos" + index.toString());
                    /* var treeList:ArrayCollection=tree.dataProvider as ArrayCollection;
                       Alert.show(" index"+index+"Length "+treeList.length);
                       if(index > treeList.length)
                       Alert.show("Returning");
                       return;
                    var items:Array=new Array();
                    if (treedropevt.dragSource.hasFormat("items"))
                        items=items.concat(treedropevt.dragSource.dataForFormat("items") as Array);
                    var parentItem:Object;
                    parentItem=getObjectTarget();
                    /* if (tree.dataDescriptor.isBranch(tree.indexToItemRenderer(index).data))
                       parentItem=tree.indexToItemRenderer(index).data;
                       else
                       var dropParentPackage:Object = tree.mx_internal::_dropData.parent as Object;
                       Alert.show("HAck"+dropParentPackage.toString());
                       parentItem=tree.getParentItem(tree.indexToItemRenderer(index).data);
                       //Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
                    //Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
                    var position:int=0;
                    /* if(ObjectUtil.getClassInfo(parentItem).properties.length==0)
                       Alert.show("Returning");
                       return;
                    if (parentItem != null)
                        try
                            while (tree.indexToItemRenderer(index).data != parentItem)
                                //Alert.show(tree.indexToItemRenderer(index).data.toString());
                                if (index > 0)
                                    index--;
                                //Alert.show("Insiade");
                                position++;
                        catch (e:Error)
                            Alert.show("Catch" + index.toString());
                            return;
                    for each (var item:Object in items)
                        var obj:Object=new Object()
                        obj.label=item.label as String;
                        if (parentItem != null)
                            //Alert.show("ADDED");                       
                            tree.dataDescriptor.addChildAt(parentItem, obj, position++);                       
                        else
                            //Alert.show("PARENT NULL");
                            tree.dataDescriptor.addChildAt(tree.selectedItem, obj, position++);                       
                        var spth:String=homePath.concat(item.label);
                        //Alert.show(spth);   
                        var dpth:String=destPath.concat(item.label);
                        //Alert.show(dpth);
                        if (result == true)
                            removeItems();
                                //FlexDnDRemoteService.process(eid,"move",spth,dpth);
                        else
                            //FlexDnDRemoteService.process(eid,"copy",spth,dpth);
                        tree.validateNow();
                public function getObjectTarget():Object
                    var dropData:Object=tree.mx_internal::_dropData as Object;
                    if (dropData.parent != null)
                        return dropData.parent;
                    else
                        // if there is not parent (root of the tree), I take the root directly
                        var renderer:IListItemRenderer=tree.indexToItemRenderer(0);
                        return renderer.data;
                public function removeItems():void
                    //remove moved elements
                    var items:Array=treedropevt.dragSource.dataForFormat("items") as Array;
                    var coll:ArrayCollection=list.dataProvider as ArrayCollection;
                    for each (var item:Object in items)
                        if (coll.contains(item))
                            coll.removeItemAt(coll.getItemIndex(item));
                private var treedropevt:DragEvent;
                public function onTreeDragDrop(event:DragEvent):void
                    treedropevt=event;
                    showAlert();
                    event.preventDefault();
                    tree.hideDropFeedback(event);
                public function resultHandler(event:ResultEvent):void
                    Alert.show("Success", "Status");
                public function faultHandler(event:FaultEvent):void
                    Alert.show(event.fault.faultString, "Failure");
            ]]>
        </mx:Script>
        <mx:ArrayCollection id="listDP">
            <mx:Object label="File1.dnd"/>
            <mx:Object label="File2.dnd"/>
            <mx:Object label="File3.dnd"/>
            <mx:Object label="File4.dnd"/>
            <mx:Object label="File5.dnd"/>
        </mx:ArrayCollection>
        <mx:Number id="lastRollOverIndex"/>
        <!--
             <mx:ArrayCollection id="treeDP">
             <mx:Object label="/home">
             <mx:children>
             <mx:Object label="dummy1.ks"/>
             <mx:Object label="dummy2.ks"/>
             <mx:Object label="e493126">
             <mx:children>
             <mx:ArrayCollection>
             <mx:Object label="/home/e493126/sample1.ks"/>
             </mx:ArrayCollection>
             </mx:children>
             </mx:Object>
             </mx:children>
             </mx:Object>
             </mx:ArrayCollection>
        -->
        <mx:ArrayCollection id="treeDP">
            <mx:Object label="/dndDest">
                <mx:children>
                    <mx:ArrayCollection>
                        <mx:Object label="sample1.ks"/>
                        <mx:Object label="sample2.ks"/>
                        <mx:Object label="sample3.ks"/>
                        <mx:Object label="sample4.ks"/>
                        <mx:Object label="sample5.ks"/>
                        <mx:Object label="sample6.ks"/>
                    </mx:ArrayCollection>
                </mx:children>
            </mx:Object>
        </mx:ArrayCollection>
        <mx:List id="list"
                 itemRollOver="lastRollOverIndex = event.rowIndex"
                 width="50%"
                 dragEnabled="true"
                 dataProvider="{listDP}"
                 labelField="label"
                 allowMultipleSelection="true"
                 dragMoveEnabled="false">
        </mx:List>
        <mx:Tree id="tree"
                 width="50%"            
                 dragEnabled="true"            
                 dataProvider="{treeDP}"            
                 dragEnter="onTreeDragEnter(event)"
                 dragOver="onTreeDragOver(event)"
                 dragExit="onTreeDragExit(event)"
                 dragDrop="onTreeDragDrop(event)"
                 labelField="label"
                 liveScrolling="true">
        </mx:Tree>
        <mx:RemoteObject id="FlexDnDRemoteService"
                         showBusyCursor="true"
                         destination="FlexDnD">
            <mx:method name="process"
                       result="resultHandler(event)"
                       fault="faultHandler(event)"/>
        </mx:RemoteObject>
    </mx:Application>
    Thanks,
    Rajiv

    Ya , i have searched and have used the same code.
    But needed to customize few things like:
    stop dnd in same tree
    drop some item into a folder ..( onto it ) etc
    have achieved the same .. but this issue ..
    i think the tree dataprovider (contents internally is not being updated .. only the UI)
    any suggestions ?
    - Rajiv

Maybe you are looking for

  • A/P INVOICE AND PURCHASE ORDER

    Is it possible to apply the following check on A/P Invoice Document. "The system should not allow a user to enter an A/P Invoice of amount greater than 10000 until it's purchase order is  entered in the system"

  • Button condition on page item and Validation error Conflict

    Hi, I have a select list page item and a button on page whose condition is based on the select list page item value(eg, If (:P2_item1='val1'){return true;}) with condition type=PL/SQL function returning boolean. This buttons submits the page. It' com

  • Windows 8.1 with Bitlocker

    Hello Experts? I have a one big problema. Today i was found problem on my directors portable hard disk. He has used bitlocker drive encryption and remember his password. When plugged hard disk then unlock drive enter password with completed successfu

  • Acrobat 9 Standard Image Issues using Word 2007

    Hi, I have just purchased and installed Acrobat 9 Standard on an XP Pro machine with Office 2007. Using the Acrobat add in (PDFMaker?) I am having issues with images (specifically graphs), they are coming out with the text upside down and no graph da

  • HT4085 My sound effects is not working

    My sound effects is not working can help me ?