Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to get IHierarchicalEnumerable? #401

Open
mikewiebel opened this issue Jul 7, 2015 · 1 comment
Open

Is it possible to get IHierarchicalEnumerable? #401

mikewiebel opened this issue Jul 7, 2015 · 1 comment

Comments

@mikewiebel
Copy link

Big fan of this project in particular the MvcSiteMapNode attribute. What I'd like to do is bind the nodes collected by mvcsitemapprovider with a menu from devexpress. I found some sample code from some years back where the developer was able to call GetHierarchicalDataSourceView from the ChildNodes property like this:
SiteMap.RootNode.ChildNodes.GetHierarchicalDataSourceView()
but that no longer seems possible.

Is there any way of getting an object that implements IHierarchicalEnumerable similar to the code snippet above?

Thanks

@NightOwl888
Copy link
Collaborator

I took a look and it seems that IHierarchialEnumerable could be supported. It has a single member, GetHierarchyData() which returns a IHierarchyData type.

IHierarchyData has 2 methods and 4 properties, all of which could be mapped to their counterparts in the MvcSiteMapProvider.SiteMapNode type.

But the real concern is how is the Item property used within the DevExpress menu? It returns type object.

If it is expecting there to be a System.Web.SiteMapNode there, then there may be a problem. There will also be a problem if it is expecting to iterate the properties through the default Index method (because there no longer is one).

So, I suggest you make a fork and implement it to try it out (assuming you have Reflector or something similar to see how it is implemented in System.Web). If you can get it working with DevExpress, then it would definitely be something I would accept as a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants