Paragraph/Hyperlink issue in CellTemplate

5 posts, 0 answers
  1. Gizmo
    Gizmo avatar
    3 posts
    Member since:
    Mar 2012

    Posted 09 Nov 2012 Link to this post

    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.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 09 Nov 2012 Link to this post

    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.

  3. Gizmo
    Gizmo avatar
    3 posts
    Member since:
    Mar 2012

    Posted 09 Nov 2012 Link to this post

    I don't think so. My version of controls is 2011.3.1116.1040
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 09 Nov 2012 Link to this post

    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.

  5. Gizmo
    Gizmo avatar
    3 posts
    Member since:
    Mar 2012

    Posted 09 Nov 2012 Link to this post

    OK. I'll try.

    Thanks
Back to Top