TreeView in ItemTemplate is blank after binding...

3 posts, 0 answers
  1. Peter From LA
    Peter From LA avatar
    36 posts
    Member since:
    May 2005

    Posted 16 Aug 2011 Link to this post

    I used the Combobox/Template example to build a RadComboBox with a RadTreeView as an ItemTemplate, but instead of a SqlDataSource I bound the tree in C# using a List<object>. The same tree works fine when it is by itself and shows all the data correctly, but when it is inside of the Item it is BLANK - the drop down is empty.

    this is my front end code:
        EmptyMessage="Select A Drawing"
            <div onclick="StopPropagation(event)">
            <telerik:RadComboBoxItem />

    This is how I do the binding:
    RadTreeView treeDrawings = (RadTreeView)rcbDrawing.Items[0].FindControl("treeDrawings");
    DrawingsCollection d = DrawingsCollection.GetByClientID(PageUser);
    treeDrawings.DataSource = d;

    Am I doing anything wrong?
  2. Ivana
    Ivana avatar
    657 posts

    Posted 18 Aug 2011 Link to this post

    Hi Peter,

    Please take a look at the help article below. There you will find examples of how to bind the RadTreeView to an Array.

    Also make sure you have set the properties DataFieldID  and  DataFieldParentID  of the RadTreeView correct as noted in the help article.

    All the best,
    Ivana Gjorgeva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Ivan Zhekov
    Ivan Zhekov avatar
    651 posts

    Posted 20 Feb 2013 Link to this post

    Hello, Peter.

    With this release: 2013 Q1, we are releasing the DropDownTree -- a control designed to work in a manner similar to TreeView in ComboBox.

    Since you have such scenario, you might be interested. You can check the examples here -- -- or later on at the official (non-beta) site.

    Ivan Zhekov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top