Is there a way to give each ContextMenu Item its own backcolor?
Hi,
I use the RadSpellChecker for some Textbox Controls and it worked great.
But when I have words with more than 9 letters, I don't get the contextmenu die Add these Words to the dictonary.
Any Idead to solve this problem?
Attached a screenshot with the contextmenu on a word with max 9 letters and a screenshot with more than 9 letters.
Thank you
Hi,
We are using RadContextMenu (winforms).
It works fine.
But we would like to remove/hide the icon column because in most cases our items don't have icon/image.
Do you know if it is possible ?
Thanks.
Alain.
how do I move the pre-built "Delete Row" option to the bottom or move my options to the top?
private void dgvSIQ_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
RadMenuItem mniProcess = new RadMenuItem();
RadMenuItem mniVendorInquiry = new RadMenuItem();
RadMenuSeparatorItem mniSeparate = new RadMenuSeparatorItem();
e.ContextMenu.Items[0].Visibility = ElementVisibility.Collapsed;
e.ContextMenu.Items[1].Visibility = ElementVisibility.Collapsed;
mniProcess.Text = "Process PO";
mniVendorInquiry.Text = "Vendor Inquiry";
//e.ContextMenu.Items.Add(mniSeparate);
e.ContextMenu.Items.Add(mniVendorInquiry);
e.ContextMenu.Items.Add(mniProcess);
try
{
mniProcess.Click += mniProcess_Click;
mniVendorInquiry.Click += mniVendorInquiry_Click;
}
catch (Exception)
{
}
}
Hello. Our application is using Telerik WinControls from Q1 2022.
We have a number of context menus where we wish to conditionally disable menu items and show a tooltip that explains why the menu item is disabled. The problem is that when the menu item is disabled then no tooltip is displayed!
How do we get tooltips to display even when the menu item is disabled?
In the following example we would not see the tooltip when menuItem.Enabled = false; Can we get a fix for this? Our work-around is causing other problems.
RadContextMenu contextMenu = new RadContextMenu();
RadMenuItem menuItem = new RadMenuItem("View in Browser");
contextMenu.Items.Add(menuItem);
if (supportsBrowser())
{
menuItem.Tooltip = "Open your browser";
}
else
{
menuItem.Enabled = false;
menuItem.Tooltip = "This device does not support browser access.";
}
I have several RadTextBox controls on a form and want to use a single RadContextMenu to provide my own context menu. Depening on which control is selected the resulting action will be a little different.
I have this code to assign my context menus to the 2 controls.
this.txtBreedersAccount.TextBoxElement.TextBoxItem.HostedControl.ContextMenu = new ContextMenu(); this.txtBreedersAccount.TextBoxElement.TextBoxItem.HostedControl.MouseDown += new MouseEventHandler(this.AccountContextMenu_MouseDown); this.txtMemberAccount.TextBoxElement.TextBoxItem.HostedControl.ContextMenu = new ContextMenu(); this.txtMemberAccount.TextBoxElement.TextBoxItem.HostedControl.MouseClick += new MouseEventHandler(this.AccountContextMenu_MouseDown);
This is my MouseDown procedure.
private void AccountContextMenu_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { this.cmnuAccount.Show(MousePosition); } }
All of this works perfectly. My issue is the I can't seem to find a way to determine which of my 2 controls was actually used to instantiate the RadContextMenu. Searching the closest I could get was something like this, but it doesn't work.
private void cmnuAccount_DropDownOpening(object sender, System.ComponentModel.CancelEventArgs e) { RadElement element = sender as RadElement; if (element == null) { return; } this._currentControl = element.ElementTree.Control as RadControl; }
Textboxes seem to be treated differently than other RadControls. If I setup the context menu on a checkbox for example it work without any issues.
I'd appreciate any help that anyone could give. Thanks.
Basically, I have a function that deals with various items, based on what the user clicked on.
So when they right click on say a label and I open my context menu, how do I figure out what label (object) it was that they clicked on?
I could do an event for every label, but that seems... bad.
I attempted to use the event DropDownOpening to see if I could access the sender for the right click to open the menu, but haven't had any luck there.
According to this page: https://docs.telerik.com/devtools/winforms/controls/menus/contextmenu/context-menus
I should be able to assign a radcontextmenu to the contextmenu of the radsyntaxeditor. However, I'm finding that not to be the case as you can see below. my contextmenu named ctxMenuEditor is of type radContextMenu.
The below screenshots should show the problem I think. Basically, for whatever reason, the radsyntaxeditor doesn't accept the radcontextmenu, just contextmenu object type.
Hi all,
I wish to open a DropDown list in a context menu when a user right click on a GridView cell and handle the click event on an element of this DropDown list.
I am a bit lost between the GridView context menu documentation and the one specific to general context menus
I tried using the RadMenuComboItem (as described in this document) but the result is no satisfactory.
Would someone have a simple example on how to do this ?
Many thanks
Patrick
Hello all!
I'm working with a use case where I can't allow the user to edit an inserted image - we're not saving the bytes, just the URL the image comes from, so the user editing the image would just be wasted time.
I've disabled the 'CanDrag', 'CanResize', and 'CanRotate' on the ImageSelectinoAdornerSettings layer. I even tried removing the layer per a forum post I found - however if I right click on the image, I see get a functional 'Edit Image' option on the context menu.
I've looked at the RadRichTextEditor Context Menu article (https://docs.telerik.com/devtools/winforms/controls/richtexteditor/ui-for-applying-rich-text-formatting/context-menu), but it doesn't show how to loop through the groups and/or the menu items themselves, and I'm hitting a wall when I try to figure that out myself.
Any suggestions on how to remove the Edit Image context menu item?
Thank you!