Help With Updating Designer Code to the New Version

4 posts, 0 answers
  1. Eric
    Eric avatar
    29 posts
    Member since:
    Jan 2008

    Posted 03 Aug 2008 Link to this post

    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.

  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 04 Aug 2008 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Eric
    Eric avatar
    29 posts
    Member since:
    Jan 2008

    Posted 04 Aug 2008 Link to this post

    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.
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 05 Aug 2008 Link to this post

    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.
Back to Top