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

Paragraph/Hyperlink issue in CellTemplate

4 Answers 36 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gizmo
Top achievements
Rank 1
Iron
Gizmo asked on 09 Nov 2012, 07:26 AM
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.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Nov 2012, 07:35 AM
Hi,

 What is your version? Are you using our latest official Q3 2012?

Kind regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Gizmo
Top achievements
Rank 1
Iron
answered on 09 Nov 2012, 08:41 AM
I don't think so. My version of controls is 2011.3.1116.1040
0
Vlad
Telerik team
answered on 09 Nov 2012, 09:14 AM
Hi,

 Please try our latest official version and let us know if you still have this problem.

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Gizmo
Top achievements
Rank 1
Iron
answered on 09 Nov 2012, 09:41 AM
OK. I'll try.

Thanks
Tags
GridView
Asked by
Gizmo
Top achievements
Rank 1
Iron
Answers by
Vlad
Telerik team
Gizmo
Top achievements
Rank 1
Iron
Share this question
or