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
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.
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.
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.