Possible to prevent RadTreeView from navigating when bound to SiteMapDataSource?

2 posts, 0 answers
  1. Jon
    Jon avatar
    23 posts
    Member since:
    Sep 2010

    Posted 11 Jan 2011 Link to this post

    Hi all,

    I have a RadTreeView which I'm binding to a SiteMapDataSource. When I click on a node, it navigates to the page URL in the SiteMap. Normally, this would likely be the behavior that one would want. However, in my case, I'm trying to use the control to allow the user to modify the tree. I don't want the control to navigate to the URL corresponding to the node when the user clicks on the node. I just want them to select the node. Does anyone know if there is a way to prevent it from navigating? I'm guessing I'm running into this problem since I'm binding to a SiteMapDataSource. I was thinking maybe I could set a Handled property on the EventArgs to the NodeClick event to override the navigation, but, it doesn't look like that is supported.

    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
    <telerik:RadTreeView ID="RadTreeView1" runat="server" 
        DataSourceID="SiteMapDataSource1" Height="200px" 

  2. Yana
    Yana avatar
    4995 posts

    Posted 12 Jan 2011 Link to this post

    Hi Jon,

    You can subscribe to OnNodeDataBound event of the treeview and set NavigateUrl property to "#" in order to avoid the navigation.

    All the best,
    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.
Back to Top