Error when switching tabItem first time

2 posts, 0 answers
  1. Nathan
    Nathan avatar
    13 posts
    Member since:
    Jan 2011

    Posted 16 Feb 2011 Link to this post

    Hi

    I have a tabControl with 2 tabItems. Each of which contains a GridView that is bound to a RIA datasource.
    <telerik:RadTabControl>
        <telerik:RadTabItem Header="Tab 1">
                    <telerik:RadGridView .... />
        </telerik:RadTabItem>
        <telerik:RadTabItem Header="Tab 2">
                    <telerik:RadGridView .... />
        </telerik:RadTabItem>
    </telerik:RadTabControl>


    When I switch tabItem for the first time I will get the following error:

    Microsoft JScript runtime error: Unhandled Error in Silverlight Application Object does not match target type.   at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.EventInfo.RemoveEventHandler(Object target, Delegate handler)
       at Telerik.Windows.Data.WeakEvent.WeakListener`1.Unsubscribe()
       at Telerik.Windows.Controls.GridView.GridViewScrollViewer.OnUnloaded(Object sender, RoutedEventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

    If I ignore the error the tabItem is changed and the corrosponding GridView is loaded and everything is fine. I can then swich between TabItems without any further errors occuring.

    This is mighty strange, is there anyway I can prevent the error from occuring?

    Thank you for any help.
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 21 Feb 2011 Link to this post

    Hello Nathan,

    We are unable to reproduce this exception in our test scenario. Could you please provide a runnable sample showing the issue? This way we could investigate in depth and provide you with a better advice. Thank you for your cooperation in advance.

    All the best,
    Petar Mladenov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
Back to Top