We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

adding to a merged menu

Hi, I''m having a problem with adding a new menu item (BarItem) to a menu at runtime. It only seems NOT to work on the menus that have been merged with a child menu. The code works fine with menus that have not been merged. Is there a way of refreshing the menu? Thanks for any help. Chris

5 Replies

AD Administrator Syncfusion Team March 8, 2004 10:08 PM UTC

Hi Chris, Please let me know the version of Essential Suite that you are using. I would also appreciate if you could send us a sample application that shows this problem. We appreciate your cooperation. Regards, Guru Patwal Syncfusion, Inc.


CS Chris Soulsby March 10, 2004 07:24 AM UTC

Hi, Please find included a test application that displays the problem. Thanks >Hi Chris, > >Please let me know the version of Essential Suite that you are using. I would also appreciate if you could send us a sample application that shows this problem. We appreciate your cooperation. > >Regards, >Guru Patwal >Syncfusion, Inc. App_7829.zip


CS Chris Soulsby March 10, 2004 07:50 AM UTC

Just a quick explanation of the code I posted. The application has two menus “filemenu” and “toolmenu”. The filemenu has a merged child bar item added to it. When you press the “Add Menus” button the code will add a BarItem to each menu. On the toolmenu menu the item appears, however, in the filemenu the item is not there. Thanks Chris >Hi, > >Please find included a test application that displays the problem. > >Thanks > >>Hi Chris, >> >>Please let me know the version of Essential Suite that you are using. I would also appreciate if you could send us a sample application that shows this problem. We appreciate your cooperation. >> >>Regards, >>Guru Patwal >>Syncfusion, Inc. > >App_7829.zip > >


AD Administrator Syncfusion Team March 10, 2004 11:15 AM UTC

Hi Chris, Thanks for the sample and the additional information. I could see the above mentioned problem here, and have requested the development team for their inputs on this issue. I will update you as soon as I hear from them. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team March 10, 2004 11:56 AM UTC

Hi Chris, Accessing the designer generated ParentBarItem component in code and modifying it will not have any effect. Instead you should get hold of a ParentBarItem’s "Merged Equivalent" (combined ParentBarItem consisting of the parent and child form''s ParentBarItems) and add the new BarItem to it as shown below : ParentBarItem mergedParent = this.mainFrameBarManager1.GetMergedEquivalent(this.parentBarItem1, this.parentBarItem1); mergedParent.Items.Add(oBarItem); I have also modified your sample accordingly and have attached it here. Please refer to the following KB article for more information on this : How do I access/modify the main-menu, other bars and ParentBarItems programatically? This KB article can be accessed at : http://www.syncfusion.com/Support/article.aspx?id=522 Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon