RadComboBox is not of type "System.Object" error

4 posts, 0 answers
  1. Sergey
    Sergey avatar
    7 posts
    Member since:
    Oct 2011

    Posted 31 Oct 2011 Link to this post

    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

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 03 Nov 2011 Link to this post

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

  3. DevCraft banner
  4. Sergey
    Sergey avatar
    7 posts
    Member since:
    Oct 2011

    Posted 04 Nov 2011 Link to this post

    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

  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 09 Nov 2011 Link to this post

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

Back to Top