search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Custom context menu when right-clicking on empty space in Scheduler

Asked by Scott Mitchell
8 years ago.

I am using Daypilot for ASP.NET MVC, specifically the Scheduler.

I set the ContextMenuSelection property of the Scheduler to show a context menu when a user right-clicks on an empty space in the scheduler. But I need to customize the context menu depending on the clicked resource.

For example, my scheduler has four resources: A, B, C and D.

If the user right-clicks on a blank cell for resource A I want to show a context menu with options X and Y. If they right-click on an empty cell for resource B I want to show a context menu with options X and Z, and so on.

How can I do this? My initial thought was to override the OnBeforeCellRender method and set the e.ContextMenuClientName property based on the resource, but there is no e.ContextMenuClientName in this event handler.


Comment posted by GaProgMan
8 years ago.

If you don't mind me asking: which properties did you have to set to enable the context menu on an empty space (I'm guessing you mean a cell here) ?

Also, can you not use the e.ResourceID to get the numerical value for the Resource and look up the value of your resource using that? I'm doing a similar thing for my event rendering.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.