I am building a menu depending upon the file structure on server. So, this is the file structure:
Videos
Reports
Customers
SetUp
Customers
Products
So, i wrote this code
System.IO.DirectoryInfo RootDir = new System.IO.DirectoryInfo(Server.MapPath("~/Videos"));
RadMenuItem RootNode = OutputDirectory(RootDir, null);
videoMenu.Items.Add(RootNode);
In output directory I'll iterate through them and return them. So, now i wanted output which looks like this:
Reports
Customers
SetUp
Customers
Products
I dont want videos to be the parent level. INstead wanted Reports and Setup to be at top. can you please help me.
Sounds like you'll want to add several parent level nodes to your RadMenu (Reports, Setup, etc.), rather than just adding the single RootNode. Whatever your
OutputDirectory
method is doing, make it return the children of "Videos" as an IEnumerable of nodes, and add those rather than RootNode.