Welcome Guest Search | Active Topics | Sign In | Register

Expanded menu Options
Ilda Cardoso
Posted: Tuesday, August 25, 2009 10:59:57 AM
Rank: Newbie
Groups: Member

Joined: 7/13/2009
Posts: 3
Hi,

How to maintain the second level of an expanded menu, when i usded databind
eo_support
Posted: Tuesday, August 25, 2009 11:10:08 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I assume you are using SlideMenu. The regular drop down menu does not maintain sub menu expanded status (there is no need to).

SlideMenu automatically maintain expanded status unless you explicitly wipe the status information out --- typically through data binding. For example the following code will rebuild the slide menu every time thus wipe out the status information:

Code: C#
protected void Page_Load(object sender, EventArgs e)
{
    SlideMenu1.DataSource = some_object;
    SlideMenu1.DataBind();
}


In order to keep the status information, you should only populate the menu on intial page load:

Code: C#
protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        SlideMenu1.DataSource = some_object;
        SlideMenu1.DataBind();
    }
}


If you use a master page together and NavigateUrl instead of post back, then its a different scenario. In that case you will need to set the slide menu's SaveStateCrossPages to true or set the slide menu's AutoSelectSource to "NavigateUr" and AutoSelectTarget to "Path" or "Item",

Hope this helps.

Thanks
João Araújo
Posted: Wednesday, August 26, 2009 9:51:19 AM
Rank: Newbie
Groups: Member

Joined: 7/23/2009
Posts: 5
Hi,

I also have this question. I have one menu with 3 levels. I wanted that the first and the second levels stayed always fixed and the 3rd appeared on mouse over. I am also doing databind.

Tk in advance

João Araújo
eo_support
Posted: Wednesday, August 26, 2009 10:04:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Please see here for a working example of such a scenaro:

http://demo.essentialobjects.com/Default.aspx?path=Menu\menu_programming\_i2\red_tabs2

You can check the full sample source code to see how it works.

Thanks!
Ilda Cardoso
Posted: Thursday, August 27, 2009 11:56:51 AM
Rank: Newbie
Groups: Member

Joined: 7/13/2009
Posts: 3
Hi,
I have one menu with 3 levels. I wanted that the first and the second levels stayed always fixed and the 3rd appeared on mouse over.
I tried to use the red tab, but the menu does not work DataBinding.
eo_support
Posted: Thursday, August 27, 2009 12:01:01 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Please see this post for detailed sample code on how to do this:

http://www.essentialobjects.com/forum/postst3536_Web-Menu-Submenu-goes-out-of-the-controol.aspx

The basic idea is you will need to DataBind to the main menu, then use code to copy sub menus into the child menus.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.