1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Treeview not working on Widget designer

Treeview not working on Widget designer

4 posts, 0 answered
  1. Moiz Ahmed
    Moiz Ahmed avatar
    15 posts
    Registered:
    31 Dec 2010
    07 Mar 2011
    Link to this post
    Hi,
    I am using treeview on the widget designer to provide easy selection of pages.
    The treeview is rendering all the nodes provided by the site map data source control but it is not showing the title or the urls of the page in the nodes

    Moiz Ahmed
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    07 Mar 2011
    Link to this post
    Hi Moiz ,

    How did you bind the control? You can set all properties of a Node inside NodeDataBound event of the RadTreeView control.

    Greetings,
    Ivan Dimitrov
    the Telerik team
  3. Moiz Ahmed
    Moiz Ahmed avatar
    15 posts
    Registered:
    31 Dec 2010
    07 Mar 2011
    Link to this post
    Hi Ivan,

    I used the wizard available for the Rad tree view. Everything is on the markup. Earlier I had also tried to use code blocks in this but they didn't seem to work at all.

    this is my code that is binding the tree view with the site map, please review and advise

    <telerik:RadTreeView ID="RadTreeView1" runat="server"  DataSourceID="CurrentSiteMap"
    DataTextField="Title" DataValueField="Url" DataNavigateUrlField="Url"

    Skin="Vista" >
                    </telerik:RadTreeView>
                           
                            <asp:SiteMapDataSource ID="CurrentSiteMap" runat="server" />
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    17 Mar 2011
    Link to this post
    Hello Moiz,

    Try using the following declaration

    <telerik:RadTreeView runat="server" ID="TreeView1" DataSourceID="SiteMap1"></telerik:RadTreeView>

    <asp:SiteMapDataSource runat="server" ID="SiteMap1" ShowStartingNode="false" />

    This should work fine.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
4 posts, 0 answered