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

RadComboBox is not of type "System.Object" error

3 Answers 20 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 31 Oct 2011, 02:30 PM
Hello,

Unfortunately, I can’t make a sample project to reproduce this error for you, but you’ve probably seen this elsewhere. When I try to show telerik ReportViewer after another telerik controls heavy user control is shown, I get the following error:
Unhandled Error in Silverlight Application
Code: 4004   
Category: ManagedRuntimeError      
Message: System.ArgumentException: The value "Telerik.Windows.Controls.RadComboBox" is not of type "System.Object" and cannot be used in this generic collection.
Parameter name: value
   at System.ThrowHelper.ThrowWrongValueTypeArgumentException(Object value, Type targetType)
   at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Add(Object value)
   at Telerik.Windows.Controls.RadToolBar.RepositionItems()
   at Telerik.Windows.Controls.RadToolBar.OnApplyTemplate()
   at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)

If I open ReportViewer first – it works fine.

Thank you for any suggestions,
Sergey

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 03 Nov 2011, 02:46 PM
Hi Sergey,

Unfortunately we haven't seen nor we have received any reports of this issue. Also we cannot reproduce it based on the information you sent and this is why I wanted to ask you if you can give us more details about your scenario.

If you can try to isolate the issue that would be very helpful as it will help us narrow down the cause and help you get over it. This is why I wanted to ask you to try isolating the steps that allow you to reproduce the problem in a written list. Also you said that issue only appears after another telerik controls heavy user control is shown, but often there are only 2 or 3 controls that are directly involved with a given problem. Can you please try to determine which are the controls that are not related to your issue. We suggest you to use the ‘remove and try’ approach when it is hard for you to determine what is causing the problem. This means that you should remove parts of the code and check if the issue reproduces without it until you find the cause.

Thank you in advance for your cooperation.

Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Sergey
Top achievements
Rank 1
answered on 04 Nov 2011, 06:49 PM
Hi Tina,

We did spent some time, but weren’t able to isolate the issue. To work around it, we had to get a ReportViewer template and replace RadComboBox with a regular combo box. If only it had EmptySelectionBoxTemplate :)

Thanks,
Sergey

0
Tina Stancheva
Telerik team
answered on 09 Nov 2011, 05:08 PM
Hi Sergey,

I am sorry that you had to change the ControlTemplate of the ReportViewer in order to get over the issue. Unfortunately we cannot help in getting over the exception as we cannot reproduce it locally. This is why I wanted to ask you if you manage to reproduce it in a sample project at a later point, to please send it to us so that we can look further into the issue.

Best wishes,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ToolBar
Asked by
Sergey
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Sergey
Top achievements
Rank 1
Share this question
or