Forum Discussion

sdobrzyn's avatar
sdobrzyn
New Contributor
14 years ago

Trouble accessing nodes in a DevExpressXtraTreeList via C# script

Hi,



Our application has a DevExpressXtraTreeList and I would like to navigate through the node using C# script.  I've created an alias to the object in the application.  When in Name mapping, I can select the alias and click edit.  This gives me a list of properties and fields which I can drill into, E.G. Nodes.FirstNode.Data.Name displays the name of first node in the tree.  Everything is cool so far until I try to do a similar thing using C#.



For example, I can get the a reference to the object using 

  TreeView = Aliases["MyApplication"]["MainForm"]["ToolWindowContainer"]["ToolWindow"]["ObjectPaletteControl"]["leftLeftPanel"]["leftList"]["treeList"]



I can access the Bottom property like this

  b = Treeview["Bottom"];



But if I try to access the Nodes the return value is null

  Nodes = Treeview["Nodes"];



I've read the test complete help about DevExpressXtraTreeList and have followed the instructions to install and enable the plugin.



Any help would be great.



Thanks,

Stewart.

3 Replies


  • Hi Stewart,





    I tried to reproduce the problem with version 10.1 of Developer Express controls, but failed - the Nodes collection was retrieved without any problems in my script. Please provide us with the following information to help us investigate the problem:

    1. What version of Developer Express controls do you use? 

    2. Can the problem be reproduced on another machine? 

    3. Can the problem be reproduced with a sample application shipped along with the controls?


  • sdobrzyn's avatar
    sdobrzyn
    New Contributor
    Hi Allen,



    I think my problem was the name of the variable I was using, TreeView.  When I changed the name to something else it all started working.



    Regards,

    Stewart.