exception when using radmenu

5 posts, 0 answers
  1. Chris
    Chris avatar
    7 posts
    Member since:
    Sep 2014

    Posted 03 Dec 2014 Link to this post

    hi,

    I have dragged the radmenu on to my form and added an item called file. When I run it it crashes with an exception here:

                this.radMenu1.Items.AddRange(new Telerik.WinControls.RadItem[] {
                this.radMenuItem1});
                this.radMenu1.Location = new System.Drawing.Point(0, 0);
                this.radMenu1.Name = "radMenu1";
                this.radMenu1.Size = new System.Drawing.Size(1085, 20);
                this.radMenu1.TabIndex = 0;
                this.radMenu1.Text = "radMenu1";

    with 
    A first chance exception of type 'System.ArrayTypeMismatchException' occurred in CampClient.exe
  2. Ralitsa
    Admin
    Ralitsa avatar
    176 posts

    Posted 05 Dec 2014 Link to this post

    Hi Chris, 

    Thank you for contacting us. 

    I was not able to reproduce the issue on my side. I followed these steps: 
    1. Install version Q3 2014 (2014.3.1104)
    2. Create Windows Form Application
    3. Add Form and RadForm
    4. Drag and drop RadMenu and add 1 menu item
    5. Run the form and can not reproduce the exception.

    Please have a look at the attached video (drag and drop over the browser to play) which demonstrates the above process.

    Could you send me a sample project or video which demonstrates the exception on your side? It would be helpful to give me information which version of Telerik UI for Winforms, Operating System and Visual Studio you use. Thank you in advance. 

    Looking forward to your response.

    Regards,
    Ralitsa
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Johnathan
    Johnathan avatar
    2 posts
    Member since:
    Jul 2014

    Posted 24 Apr 2015 in reply to Ralitsa Link to this post

    Hit the exact thing just now. The code generated in the designer was being implemented as so below:

    // 
    // radMenu1
    // 
    this.radMenu1.Items.AddRange(new Telerik.WinControls.RadItem[] {
    this.radMenuItem1});
    this.radMenu1.Location = new System.Drawing.Point(0, 0);
    this.radMenu1.Name = "radMenu1";
    this.radMenu1.Size = new System.Drawing.Size(1527, 20);
    this.radMenu1.TabIndex = 1;
    this.radMenu1.Text = "radMenu1";

     

     Saw that is was using "Telerik.WinControls.RadItem" in LINE:4 instead of "Telerik.WinControls.UI.RadMenuItem". 

     

    This is on the 331 Assemblies that I just pulled down this evening. Attached are the before and after screenshots. Hope this helps.

     

     

  5. Johnathan
    Johnathan avatar
    2 posts
    Member since:
    Jul 2014

    Posted 24 Apr 2015 in reply to Johnathan Link to this post

    EDIT: Seems to not want to keep the edited designer code with the 331 assemblies. Had to switch back to 2015_1_225 assemblies before I could resume getting this application moving. Have not seen this before though I am not in a spot to troubleshoot further due to time.
  6. Ralitsa
    Admin
    Ralitsa avatar
    176 posts

    Posted 28 Apr 2015 Link to this post

    Hi JB, 

    Glad to see you on the forums.

    We were not able to reproduce the mentioned issue with several Telerik UI for WinForms versions - Q3 2014(2014.3.1104), Q1 2015(2015.1.225) and Q1 2015 SP1(2015.1.331). When we add menu items via the designer they are always added as:
    this.radMenu1.Items.AddRange(new Telerik.WinControls.RadItem[] {
                this.radMenuItem1});

    The process we use is to create a new Windows Forms app, add RadMenu to it and add items either via the design time surface, or via the Items collection. Which approach are you using? (attached you can find my test app).

    Would you also share:
    1. Which version of Telerik UI for WinForms is installed in the GAC, if such? 
    2. Which version of Telerik UI for WinForms is referenced in the application where the issue is reproducible?
    3. Is the Telerik.WinControls.UI.Design.dll included in the References? 

    I am looking forward to your reply.   

    Regards,
    Ralitsa
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready