Bold parent nodes in a databound radtreeview.

2 posts, 0 answers
  1. Roger
    Roger avatar
    5 posts
    Member since:
    Jun 2014

    Posted 22 Apr Link to this post

    I have a telerik:RadTreeNodeBinding within a telerik:RadComboBox.

    Is there a way to format the parent node in bold text of a databound radtreeview?

    Thanks,

    Roger

     

     

  2. Roger
    Roger avatar
    5 posts
    Member since:
    Jun 2014

    Posted 22 Apr in reply to Roger Link to this post

     
    I've found a solution:
    Added the foreach code after the Databind(0.                
                    radTreeView.DataTextField = "Text";
                    radTreeView.DataValueField = "ID";
                    radTreeView.DataFieldID = "ID";
                    radTreeView.DataFieldParentID = "GroupIds";
                    radTreeView.DataSource = siteData;
                    radTreeView.DataBind();
                    foreach (var itm in radTreeView.Nodes.Cast<RadTreeNode>().Where(itm => itm.Nodes.Count > 0))
                    {
                        itm.Font.Bold = true;
                    }
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top