Try Now
More in this section

Forums / Bugs & Issues / SitefinitySiteMapDataSource always null

SitefinitySiteMapDataSource always null

2 posts, 0 answered
  1. Phil
    Phil avatar
    4 posts
    24 Mar 2015
    02 Apr 2015
    Link to this post

    Im trying to create a side navigation control but running into some difficulty. im trying to attach a datasource to a NavigationContainer. But I get an object reference cannot be set to an instance error on navigationContainer.DataBind(). 


    protected void Page_Load(object sender, EventArgs e)
                var dataSource = new Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource();
                dataSource.Provider = SiteMapBase.GetCurrentProvider();
                navigationContainer.DataSource = dataSource;



  2. David C
    David C avatar
    33 posts
    02 Dec 2015
    09 Apr 2015
    Link to this post
    Hi Phil,

    Need a bit more info to tell what's going on. Can you please place your full code on dropbox or some other accessible online repository? 

    In the meantime can you please take a look at the following blog post and see if it can shed any light on your issue?

    Custom Navigation based on a Custom Security

    There is sample code you can download that will hopefully guide you in the process of setting your custom nav up.

    David C
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered