This question is locked. New answers and comments are not allowed.
Hi There,
I am having a problem in my Silverlight 4 project. If I nest a RadTabControl in a RowDetailsTemplate of the RadGridView control, at runtime when I try to expand the row details, the following error is logged in the output window and the details panel is not displayed:
My XAML is as follows:
CodeBehind is as follows:
I am using Silverlight 4 for my project (but also have the Silverlight 5 RC tools installed). I am also using RadControls for Silverlight - Build 2011.2.823.1040.
Thanks very much!
I am having a problem in my Silverlight 4 project. If I nest a RadTabControl in a RowDetailsTemplate of the RadGridView control, at runtime when I try to expand the row details, the following error is logged in the output window and the details panel is not displayed:
System.Windows.Data Error: ConvertBack cannot convert value 'Visible' (type 'System.Windows.Visibility'). BindingExpression: Path='DetailsVisibility' DataItem='[GVR: Item=b;]' (HashCode=4368081); target element is 'Telerik.Windows.Controls.GridViewToggleButton' (Name=''); target property is 'IsChecked' (type 'System.Nullable`1[System.Boolean]').. System.Windows.Markup.XamlParseException: Set property 'System.Windows.Controls.ContentControl.Content' threw an exception. [Line: 26 Position: 25] ---> System.ArgumentNullException: Value cannot be null.Parameter name: element at MS.Internal.XcpImports.ItemsControl_GetItemsOwner(DependencyObject element) at System.Windows.Controls.ItemsControl.ItemsControlFromItemContainer(DependencyObject container) at Telerik.Windows.Controls.ItemsControl.ItemsControlFromItemContainer(DependencyObject container) at Telerik.Windows.Controls.RadTabItem.get_Owner() at Telerik.Windows.Controls.RadTabItem.get_HasOwner() at Telerik.Windows.Controls.RadTabItem.OnContentChanged(Object oldContent, Object newContent) at System.Windows.Controls.ContentControl.OnContentChanged(IntPtr nativeTarget, CValue& oldContentValue, CValue& newContentValue) --- End of inner exception stack trace --- at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData) at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name) at MS.Internal.XcpImports.DataTemplate_LoadContent(DataTemplate template) at System.Windows.DataTemplate.LoadContent() at Telerik.Windows.Controls.GridView.DetailsPresenter.LoadDetailsElement() at Telerik.Windows.Controls.GridView.DetailsPresenter.UpdateDetailsElement() at Telerik.Windows.Controls.GridView.DetailsPresenter.UpdateVisibility() at Telerik.Windows.Controls.GridView.DetailsPresenter.Telerik.Windows.Data.IWeakEventListener<System.ComponentModel.PropertyChangedEventArgs>.ReceiveWeakEvent(Object sender, PropertyChangedEventArgs args) at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) at Telerik.Windows.Controls.GridView.DetailsProvider.OnPropertyChanged(PropertyChangedEventArgs args) at Telerik.Windows.Controls.GridView.DetailsProvider.OnPropertyChanged(String propertyName) at Telerik.Windows.Controls.GridView.DetailsProvider.set_Visibility(Visibility value) at Telerik.Windows.Controls.GridView.GridViewRow.OnDetailsVisibilityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue) at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation) at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter) at System.Windows.DependencyPropertyListener.set_Value(Object value) at System.Windows.PropertyAccessPathStep.set_Value(Object value) at System.Windows.Data.BindingExpression.UpdateValue().My XAML is as follows:
<UserControl x:Class="ReproProblem.MainPage" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" > <Grid x:Name="LayoutRoot" Background="White"> <telerik:RadGridView ItemsSource="{Binding MyData}"> <telerik:RadGridView.Columns> <telerik:GridViewToggleRowDetailsColumn/> </telerik:RadGridView.Columns> <telerik:RadGridView.RowDetailsTemplate> <DataTemplate> <Grid> <telerik:RadTabControl> <telerik:RadTabItem Header="Test"> <Button Content="Test"/> </telerik:RadTabItem> </telerik:RadTabControl> </Grid> </DataTemplate> </telerik:RadGridView.RowDetailsTemplate> </telerik:RadGridView> </Grid></UserControl>CodeBehind is as follows:
using System.Collections.Generic;using System.Windows.Controls;namespace ReproProblem{ public partial class MainPage : UserControl { public MainPage() { MyData = new List<string>() { "a", "b", "c" }; InitializeComponent(); this.DataContext = this; } public List<string> MyData { get; set; } }}I am using Silverlight 4 for my project (but also have the Silverlight 5 RC tools installed). I am also using RadControls for Silverlight - Build 2011.2.823.1040.
Thanks very much!