Rank: Advanced Member Groups: Member
Joined: 6/4/2008 Posts: 38
|
Hello,
I'm loading my menu with a data table, no problem with this.
When I make click in the top level of my menu, it redirects to the link of the first submenu. I want to disable the click on the first level menu. How can I do this ?
Thanks a lot.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
That's normal. Each menu item is created from a record. So unless your database contains a record that has no target Url, you will get that.
There are two ways to workaround it, the first is to add a record that has no target Url in your datasource; The second is to handle the menu's ItemDataBound event. Inside that event handler check the newly created item's Level property. If you see its Level is 0, then set the item's NavigateUrl to string.Empty.
Thanks
|