Hi!
I have an error, when clicking on Hyperlink:
System.InvalidOperationException: Reference is not a valid visual DependencyObject.
at System.Windows.Media.VisualTreeHelper.GetRelative(DependencyObject reference, RelativeKind relativeKind)
at Telerik.Windows.Controls.ParentOfTypeExtensions.GetParent(DependencyObject element)
at Telerik.Windows.Controls.ParentOfTypeExtensions.<GetParents>d__0.MoveNext()
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value)
at Telerik.Windows.Controls.ParentOfTypeExtensions.IsAncestorOf(DependencyObject element, DependencyObject descendant)
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.OnGridViewVirtualizingPanelLostFocus(Object sender, RoutedEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Here is my .xaml:
<telerik:GridViewDataColumn Width="*"
IsReadOnly="True"
DataMemberBinding="{Binding Value}"
Header="{fw:Localize Path=SomeTitle}">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<RichTextBlock Padding="5,0">
<Paragraph>
<Hyperlink Command="{Binding OpenCommand}" CommandParameter="{Binding}">
<Run Text="{Binding Name}"/>
</Hyperlink>
</Paragraph>
</RichTextBlock>
</Grid>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
Please, provide the solution.
Thanks.
I have an error, when clicking on Hyperlink:
System.InvalidOperationException: Reference is not a valid visual DependencyObject.
at System.Windows.Media.VisualTreeHelper.GetRelative(DependencyObject reference, RelativeKind relativeKind)
at Telerik.Windows.Controls.ParentOfTypeExtensions.GetParent(DependencyObject element)
at Telerik.Windows.Controls.ParentOfTypeExtensions.<GetParents>d__0.MoveNext()
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value)
at Telerik.Windows.Controls.ParentOfTypeExtensions.IsAncestorOf(DependencyObject element, DependencyObject descendant)
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.OnGridViewVirtualizingPanelLostFocus(Object sender, RoutedEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Here is my .xaml:
<telerik:GridViewDataColumn Width="*"
IsReadOnly="True"
DataMemberBinding="{Binding Value}"
Header="{fw:Localize Path=SomeTitle}">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<RichTextBlock Padding="5,0">
<Paragraph>
<Hyperlink Command="{Binding OpenCommand}" CommandParameter="{Binding}">
<Run Text="{Binding Name}"/>
</Hyperlink>
</Paragraph>
</RichTextBlock>
</Grid>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
Please, provide the solution.
Thanks.