How to enable or disable ContextMenu in RadScheduleView - radscheduler

I have a RadSchedule calendar object displayed on my page. I defined a RadContextMenu with a RadMenuItem for the RadSchedule. I want to enable or disable this context menu item based on the appointment type that the user is right clicking.
Currently, the Context Menu always displays.
How can I enable or disable a RadMenuItem?

Related

Get the calling component of TPopupMenu

I have a TStringGrid, that has a TPopupMenu connected.
By clicking one event of the popup menu, I would like to get the calling component. Is that possible?
Background:
It is a bigger project, every form has a "BasicForm" I can inherited from. So I would like to provide a "default popup menu" for grids that have stuff like Copy, Select, and so on in it. In the inherited form I only match the grid (if exists) with that popup and I'm done.
Seems you are looking for the PopupComponent property of TPopupMenu:
Vcl.Menus.TPopupMenu.PopupComponent
Indicates the component that last displayed the popup menu in response
to a right mouse click.
Read PopupComponent to determine which control is currently using the
popup menu. In applications where multiple controls share the same
pop-up menu, use PopupComponent to determine which of them displayed
the menu.
Set PopupComponent to associate a control with the menu before calling
the Popup method programmatically to bring up the pop-up menu.

Find the grid on which the context menu item is clicked on

I have a grid panel and i have a item context menu on it, which have sub items as well. When a user clicks on the sub menu item or context menu item, i want to know on which grid panel this context menu is on. Can i do this?
Use the add method to add the menu to the corresponding grid, and then later, you can get the grid using the up method.

How to programmatically enter edit mode of an item in a TListView?

In the TListView control, you can edit an item by clicking on it twice. A box appears around the item for user to type in a new value. How can I enable edit mode programmatically? I would like to protect the list from accidental editing, and disable editing (by enabling the ReadOnly property). Then, when the user presses an Edit button, the item will become active to edit. How can I do this?
Also, if suppose the user selects an item, then scrolls out of that item's view, then presses Edit, the list needs to first scroll to make that item visible.
After setting ReadOnly to false you can call the EditCaption method. Call MakeVisible to scroll the item in view.
ListView1.Items[0].MakeVisible(False);
ListView1.items[0].EditCaption;

Right-click MenuIcon

How would I make it so that when the user right-clicks, control-clicks or command-clicks on the menu item have it show a menu but if they just click do an action
What I would like it to do is similar to Caffeine:
Caffeine
Can create mouse Event and add Options there as required. For more Details Search http://net4attack.blogspot.com/

jQuery Mobile - Disable multiple select menu label changes - count bubble

When using a selection menu with the option for multiple select, jquery changes the menu's label based on the selected elements.
http://jquerymobile.com/demos/1.1.0/docs/forms/selects/custom.html
See this fiddle. When user selects shipping options, the selected elements show in the menu's label.
http://jsfiddle.net/VEYjV/3/
How can I disable this feature and force the menu to keep the label I've associated with it (i.e. Choose options)? How can I disable the count bubble feature?
I figured out how to disable these features by hacking into the jquery.mobile lib.
I disabled the setButtonText and setButtonCount funcions when called from the refresh
refresh: function() {
//this.setButtonText();
//this.setButtonCount();
},

Resources