473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Adding to an existing MenuItem's MenuItem Collection Dynamically

I have a static ContextMenu already built and it works.

I am trying to add a submenu (right arrow with a new menuitem list) dynamically when the popup is created.

The new set of menuitems requires some DB queries to be done and then the menuitems to be added to the Menuitems collection of an existing menuitem

This operation is sensitive to the record that the user has right clicked, so this dynamic sublist of actions can be different each time the user right clicks.
However while I get the context menu every time the user right clicks, the dynamically generated submenu only displays once per execution of the application.

Someone must have done this before.....Please Help.....Frustrated..

I have tried to clear the menuitems for the dynamic menuitems collection on the dispose of the popup event, but dispose is not called and there is not an event that tells me when this menu is no longer displayed.

argghhkd#&#&#&#
Nov 21 '05 #1
1 2035
Hi snesbit,

I find that this issue has already been posted in
"microsoft.public.dotnet.framework.windowsforms.co ntrols" newsgroup. I have
added a reply to you in that newsgroup. You may follow up there and I will
monitor that thread. Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 21 '05 #2

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

Similar topics

8
by: filip stas | last post by:
How do i add references during runtime?
8
by: Kevin Little | last post by:
#!/usr/bin/env python ''' I want to dynamically add or replace bound methods in a class. I want the modifications to be immediately effective across all instances, whether created before or...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
10
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal...
6
by: Agnes | last post by:
dim c as controls for each c in me.controls messagebox.show(c.name) next c I found that the menu time didn't show up ?? It didn't belongs to the control in the form ??? I need to...
2
by: jack | last post by:
Hello, I need to dynamically add menu items to an existing menu on an MDI form. In the form load, when I create the menu items then add it to the menu control using the Add method, the entire...
0
by: Przemek | last post by:
Hi, I'm trying to create menu dynamically (populated with dataset). I want to have it inside my div, which is inside another div and inside contentplaceholder. Unfortunately I'm receiving null...
5
by: PL | last post by:
I try to find a way to get all the existing objects related to a WinForm... I tried "this.Controls" and "this.components.Components" but I'm not reaching all the existing objects... I need to...
11
by: Daz | last post by:
Hello everyone. I am sure the answer to my question is simple, but I can't seem to dynamically add an onClick event to my script. I have a table which is generated dynamically, I am just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.