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

exception when using radmenu

4 Answers 18 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 03 Dec 2014, 08:36 AM
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

4 Answers, 1 is accepted

Sort by
0
Ralitsa
Telerik team
answered on 05 Dec 2014, 07:49 AM
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.

 
0
Johnathan
Top achievements
Rank 1
answered on 24 Apr 2015, 05:03 AM

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.

 

 

0
Johnathan
Top achievements
Rank 1
answered on 24 Apr 2015, 05:20 AM
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.
0
Ralitsa
Telerik team
answered on 28 Apr 2015, 12:03 PM
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.

 
Tags
Menu
Asked by
Chris
Top achievements
Rank 1
Answers by
Ralitsa
Telerik team
Johnathan
Top achievements
Rank 1
Share this question
or