PC Review


Reply
Thread Tools Rate Thread

Adding to an existing MenuItem's MenuItem Collection Dynamically

 
 
snesbit
Guest
Posts: n/a
 
      8th Mar 2005
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#&#&#&#


 
Reply With Quote
 
 
 
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      9th Mar 2005
Hi snesbit,

I find that this issue has already been posted in
"microsoft.public.dotnet.framework.windowsforms.controls" 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.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically add menuItem - reflection and System.ErrorHandler ricva Microsoft Dot NET Framework Forms 0 13th Apr 2007 01:39 PM
Adding a contextMenu to a menuitem xlar54 Microsoft C# .NET 1 11th Feb 2007 05:21 PM
Adding to an existing MenuItem's MenuItem Collection Dynamically snesbit Microsoft Dot NET Framework Forms 3 9th Mar 2005 03:08 AM
Problem adding menuitem Claire Microsoft C# .NET 0 2nd Mar 2005 12:32 PM
ArgumentException when adding a MenuItem INCA Hellas Ltd Microsoft Dot NET Compact Framework 1 18th Nov 2004 11:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:00 AM.