Home Unanswered Active Tags New Question

menu Item

Hi, is it not possible to enable and disable menu item in context menu if possible please reply as early as possible
Asked by Balaji KN 3 years ago.
Replies
You could make the menu item text gray by wrapping it inside a span element:

<span style="color:gray">Delete</span>

and set the javascript action to nothing:

void(0);

It could be helpful to create two menus (one with all the items active, one with disabled items) and switch as the context changes (using BeforeEventRender event handler).
Comment posted by Dan Letecky 3 years ago.

Hi,

please tell me where should i include that <SPAN> in my code

Comment posted by Anonymous 3 years ago.

if i include <SPAN > inside DayPilot:DayPilotMenu > am getting error

DayPilot:DayPilotMenu ID="contextMenuOnFreeTimeRange" ShowMenuTitle="false" runat="server" MenuBackColor="#FFE0C0" MenuItemColor="#FF8000" MenuTitle=""


DayPilot:MenuItem Text="New" Action="JavaScript" ToolTip="New Event" JavaScript="return onNewEventClick(e)"
DayPilot:DayPilotMenu

Comment posted by Balaji KN 3 years ago.
reply as early as possible
Comment posted by Anonymous 3 years ago.

It believe encoding the < and > using &lt; and &gt; should work.

You could also add the menu items in the code behind (e.g. in Page_Load method).

Comment posted by Dan Letecky 3 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java