Dynamically navigating RadTreeList control

2 posts, 0 answers
  1. John
    John avatar
    1 posts
    Member since:
    Dec 2007

    Posted 19 Aug 2011 Link to this post


    I am evaluating the Test Studio plugin for Visual Studio for testing of a Web app that has a mix of javascript/html pages and Silverlight components.  The silverlight modules consist of a mixture of rad controls and standard sl controls.  I'm required to perform validation on a screen that implements the RadTreeList control.  Specifically it's a screen that will change dynamically regarding the available columns and rows based on prior operations in the application.  Because of this I will not know the grid configuration prior to navigating to the screen.

    What I need to be able to do is traverse the control to be able to extract cell contents for validations.  In the short time I've experimented with Test Studio Express, it seems that it's preferred method is to track cell/column contents via x,y coordinates.  This solution is not viable for my implementation due to the dynamic nature of the control in our implementation.  Ideally I'd like to be able to navigate via the table column headers, then extract a cell value from the selected row at the targeted column index.  I've done this with standard HTML tables and it works well.

    Is this type of operation achievable with the TreeView control?  What other options might I have?


  2. Stoich
    Stoich avatar
    1 posts

    Posted 25 Aug 2011 Link to this post

    Hi John,
        currently no wrappers exist for the RadTreeList control. It's possible to treat the TreeList as a GridView in order to navigate it. However, some of the functionality assoicated with GridView will not be functional. For instance if you get a Row which is a part of a TreeList attempting to access its cells from the Cells property won't work. Here's a piece of code that navigate the TreeList view found here:
    int row = 0;
    foreach (FrameworkElement ggg in  Pages.TelerikTreeListViewFor.SilverlightApp.Find.AllByType("TreeListViewRow"))
                    GridViewRow gg1 = ggg.As<GridViewRow>();
                    Log.WriteLine("Row " + row.ToString() + "-->" + gg1.Name);
                    int cell = 0;
                    foreach (GridViewCell c in gg1.Cells) {                  
                        Log.WriteLine("Cell "+cell.ToString()+":"+ c.Text);

    Let me know if you require additional assistance with getting this to work.

    the Telerik team
    Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Back to Top