Telerik Forums
UI for WinForms Forum
1 answer
52 views

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)
			{
			}

		}

Dinko | Tech Support Engineer
Telerik team
 answered on 24 Aug 2023
3 answers
89 views

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

Patgat
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 13 Jan 2023
1 answer
49 views

The radgrid view has many different context menus it can show depending on what row you are on.

 

Header

Column Header

Column Filter Row (Contains, Begins With ....)

FilterRow (Type and highlights Yellow if found in Grid Results)

DataRow 

 

private void gvResults_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
        {

     // How to tell which row I am in so I can change if needed the context menu?

}

 

// This is how I can tell if it is a Data Row

GridDataCellElement dataCell = e.ContextMenuProvider as GridDataCellElement;
            if (dataCell == null)
                return;

 

// What about the others? 

//How can I tell  (Column Header, Column Filter, Row Filter etc.)

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Jun 2022
Narrow your results
Selected tags
Tags
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
DateTimePicker
CollapsiblePanel
Conversational UI, Chat
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?