This is a migrated thread and some comments may be shown as answers.

Help With Updating Designer Code to the New Version

3 Answers 158 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 04 Aug 2008, 12:36 AM
Hi, I have just downloaded the newest version of radControls for WinForms, and it looks + works great!

However, the rightColumnItems are not compatible with Q1 2008 SP1, since I get an error in the designer code at


this

.radMenuItem4.RightColumnItems.AddRange(new Telerik.WinControls.RadItem[] {this.radMenuComboItem1, this.radMenuItem7});

'Telerik.WinControls.UI.RadMenuItem' does not contain a definition for 'RightColumnItems'

I also get a bunch of warnings: 

'Telerik.WinControls.UI.RadMenuItemBase.HasTwoColumnDropDown' is obsolete

When I select the form, I get a message saying:

Error parsing RadItem: Children collection doeas (typo: does) not match - index is not valid radMenuComboItem1 [Telerik.Wincontrols.UI.RadMenuComboItem](1).MenuComboItemBorder[BorderPromitive](1).

In Visual Studio 2005: when I select the menu at runtime I get an error:

Cannot remove the specified item because it was not found in the specified Collection.

How can I change this code to fit Q2 2008?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 04 Aug 2008, 08:34 AM
Hello Eric,

Thank you for writing.

Sorry for inconvenience caused.
We have a breaking change on the RadMenu which includes removed RightMenuItems.

You should change the type of
radMenuItem4 in Designer.Cs from RadDropDownButtonElement to RadApplicationMenuButtonElement
and change line
this.radMenuItem4.RightColumnItems.AddRange
that adds Button items to Right Menu to
RadApplicationMenuButtonElement.DropDown.RightColumnItems see sample code bellow:

this.radMenuItem4.RightColumnItems.AddRange(new Telerik.WinControls.RadItem[] {this.radMenuComboItem1, this.radMenuItem7});

should be

RadApplicationMenuDropDown dropDown = this.
radMenuItem4.DropDownMenu as RadApplicationMenuDropDown;
dropDown.RightColumnItems.AddRange(new Telerik.WinControls.RadItem[] {this.radMenuComboItem1, this.radMenuItem7});


Hope this helps.



Greetings,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Eric
Top achievements
Rank 1
answered on 04 Aug 2008, 10:47 PM
Thanks.

I changed RightColumnItems to Items and reboot the solution a few times.  Visual Studio seemed to fix the problem by itself.  The only thing that happened was that two extra elements were generated, which I deleted.

Will this affect my application?

Thanks again.
0
Peter
Telerik team
answered on 05 Aug 2008, 09:03 AM
Hi Eric,

I don't expect any problems and if your menu looks fine and does not have missing items, then everything is OK.

Greetings,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
RibbonBar
Asked by
Eric
Top achievements
Rank 1
Answers by
Peter
Telerik team
Eric
Top achievements
Rank 1
Share this question
or