We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Menu Item Looks and Event Handlers

Thread ID:





73829 May 21,2008 02:37 PM UTC May 27,2008 09:35 AM UTC ASP.NET Web Forms (Classic) 1
Tags: Tools
Administrator [Syncfusion]
Asked On May 21, 2008 02:37 PM UTC


My requirement is to create a horizontal menu bar with say about 5 items(picked from the DB). If I click on the item, it needs to display the sub menu in a horizontal menu bar, instead of the normal vertical display. I also want the main menu items to have different colors upon their selection.

I am trying to use some styling on the Menu bar and menu items in them. I have created a custom file (CustomMenu.css). I tried the using the vaious classes that are a part of MenuItemLook (eg : ItemCSSClass, ItemContCssClass, etc), they dont seem to work when I give custom class names, but they work with the default class names. The only problem with default class names is that I would not be able to change the look of the menu item dynamically (depending on the tab selected). Have tried all the options in the http://www2.syncfusion.com/ug_62/toolsweb/default.html, but no use.

As for the event handlers, I am not able to trigger the event. The method name is defined in the properties of the Menu. I have defined the method as follows :

protected bool Menu1_ItemSelect(object oSender, Syncfusion.Web.UI.WebControls.Tools.MenuCommandEventArgs e)
// My method definition

public void Menu1_ItemCommand(object oSender, Syncfusion.Web.UI.WebControls.Tools.MenuCommandEventArgs e)
// Method Definition

Any help will be greatly Appreciated.


Melba Winshia [Syncfusion]
Replied On May 27, 2008 09:35 AM UTC

Hi Preetha,

We regret for the delayed response.

1) Issue while changing the look of the menu item dynamically :

You can have different colors for main menu item depending upon menu item selection by using below code snippet:

protected bool Menu1_ItemSelect(object oSender, Syncfusion.Web.UI.WebControls.Tools.MenuCommandEventArgs e)

if (e.Item.Text == "View")
MenuItemLook look = new MenuItemLook();
look.ID = "RootItemsLook";
look.StateDataDefault.TextContainerCSSClass= "View";
e.Item.Look = "RootItemsLook";
return true;

Please refer the sample in the below link which illustrates the above:


2) I am not able to trigger the event :

I am afraid that I am not able to reproduce this issue. Please refer the test sample that I have used to test this issue:


Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample or send us the modified sample so that we could sort out the cause of the issue and provide you a solution?



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon