Is there a server-side script for creating hierarchical webdatamenu menu items programmatically? I have a data table that I would like to generate all the menu items from. I would have used the hierarchicaldatasource control, but you aren't able to bind the IsSeparator to it.
You are absolutely right, I'll log your request as an enhancement request in our internal systems so that it is properly tracked.
Lubomir,
Thanks for taking the time to reply to my post. I will try to do it the way you're suggesting. However, my question is what is the point of having a menu that is dynamically populated from a database if you have to still change code to put in the separators? This seems like a bit oversight when designing, that you might want to change in your next release. Just a suggestion.
As a customer, I would expect the menu to be able to be entirely data driven. So, I bind to a data source and map a boolean field (bit) to whether it's a separator or not and that allows me to edit the table directly to modify the menu instead of having to also edit code, recompile and redeploy the project as well.
Thanks,Nathon
Hi Nathon,
The simplest this is to bind to WebHierachicalDataSource and then in the OnDataBound event, when the menu items are added from the data source, just traverse them and insert separators manually on the appropriate places in the Items collection.
Thanks,
Lubomir