This is a migrated thread and some comments may be shown as answers.

Node selected but no selected css class

1 Answer 34 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 15 Sep 2009, 01:19 PM
Hi,
I have this code:
RadTreeView radTreeView = (RadTreeView)RadComboBox1.Items[0].FindControl("RadTreeView1"); 
 
            IList<CoorIS.DomainObjects.Unit> units = UnitService.GetUnitsAsExpanded(PageInfo.CurrentUnitID, Guid.Empty); 
            radTreeView.DataSource = units; 
            radTreeView.DataTextField = "Name"
            radTreeView.DataValueField = "ID"
            radTreeView.DataFieldID = "ID"
            radTreeView.DataFieldParentID = "ParentID"
            radTreeView.DataBind(); 
 
             
            RadTreeNode node = radTreeView.FindNodeByValue(PageInfo.CurrentUnitID.ToString()); 
            if (node != null
            { 
                node.ExpandParentNodes(); 
                node.Selected = true
                 
                RadComboBox1.SelectedItem.Text = node.Text; 
            } 

The node is selected but I don't see it cause it doesn't apply the selected style, why?
I have to click on the node to see the correct style.
(I'm using 2009.02.0701.35)

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 Sep 2009, 02:03 PM
Hi Mattias,

I couldn't reproduce this locally. Please find attached my test page. What could be different in your case?

Kind regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TreeView
Asked by
Mattias
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or