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

Error when switching tabItem first time

1 Answer 62 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 16 Feb 2011, 09:58 PM
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.

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 21 Feb 2011, 01:12 PM
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!
Tags
TabControl
Asked by
Nathan
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or