473,563 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need some help with ListView ContextMenu

I would like to have a ListView where the user can right-lick on any row to
have options specific to that row, then also be able to right-click on the
column header to get a different menu. Currently, I have set the ListView's
ContextMenu property a specified instance and it will be activated whenever I
right click anywhere within the ListView- regardless of the event happening
within a row or within a column header. What's the simplest way to get two
different menus depending on where the user right-clicked?
Nov 16 '05 #1
0 2431

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1506
by: Valerie Hough | last post by:
Is there any reason why a ContextMenu object cannot be created (and populated with menu items) in the constructor of the control for which it will be used? If not, then why don't my mnemonics show up if I do it this way? (they work but don't show as umderlined) If I create the ContextMenu in my form and use the ShowMenu() function from...
2
1569
by: Mantorok | last post by:
Hi If I double-click my listview to open a non-modal form the form displays, but when I click on it the form with the listview on it pops over the top of it. If I do the same thing via a contextmenu it works fine, it's just the double-click that seems to have strange behaviour. Any ideas?
0
1975
by: Bill Johnson | last post by:
I have a further question regarding an archive post at: http://groups-beta.google.com/group/microsoft.public.dotnet.languages.csharp/messages/fe7604b410b324e8,ab8f23349b8bf19d,d79c7c14342df130,34af0447073a6842 and the error message: System.ArgumentOutOfRangeException from System.Windows.Forms Specified argument was out of the range of...
5
1538
by: A-PK | last post by:
Hi, I am using treeview as my menu. my menu is like the following + Users & Groups - Users -Groups + Departmenuts - Engineering
1
1450
by: RonNanko | last post by:
I am facing a userinteraction issue with a listview, which is populated/updated by a background task. While the population of the listview is taking place, the user should already be able to execute actions on the already visible items. For convenience purposes, I have added a contextmenu to the listview, which contains the most commonly...
0
896
by: stefan.soderholm72 | last post by:
Hi, using VS2005 I want to be able to implement a ListView in details-mode with contextmenu-functionality like windows explorer. IE, I want to show a contextmenu when I right-click the columnheaders where I can choose the columns to display, but I don't want that contextmenu to show if I click on the items or empty space in the list. Can...
0
1069
by: news.microsoft.com | last post by:
Hello, I have attached a contextmenustrip in the designer to a listview. When running, if there is no item in my listview, the contextmenu still shows. How can I hide it when no item is selected in the listview (when right click is done)?
5
10068
by: Phill W. | last post by:
(VB'2003) What's the correct way to remove multiple, selected items from a ListView control (say, from a ContextMenu)? I ask because I'm getting a very annoying ArgumentOutOfRangeException because the ListView seems to be trying to "re-select" items that are no longer there! for example, giventhat I have 3 items in my list: Select the...
12
4002
by: Tom Bean | last post by:
I am trying to display a ContextMenuStrip when a user right-clicks on an item in a ListView and have encountered a something that seems strange to me. When the ListView is initially populated, no items are selected. When the first item is selected by clicking either the left or right button, the SelectedIndexChanged event fires but not the...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.