SitefinitySiteMapDataSource always null

Posted by Community Admin on 04-Aug-2018 11:55

SitefinitySiteMapDataSource always null

All Replies

Posted by Community Admin on 02-Apr-2015 00:00

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;

            navigationContainer.DataBind();

Posted by Community Admin on 09-Apr-2015 00:00
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.

Regards,
David C
Telerik
 
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
 
This thread is closed