I have contents of a cell (column) as URL. Is it possible that it shows it like a hyperlink and when clicked; it opens the URL in a browser?
Step in right direction. How can I show a different text to hyperlink in that cell. Assuming I have another column in data table representing the hyperlink.
I have slight guess that I can bind to another field but can not workout the path. I have highlighted it below.
<TextBlock Margin="{TemplateBinding Padding}" VerticalAlignment="Center" HorizontalAlignment="Center"> <Hyperlink Name="hpLinkOrderID" Click="hpLinkOrderID_Click" NavigateUri="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value}"> <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type igDP:Field}}, Path=Cells["ProductLink"].Value}" HorizontalAlignment="Center"/> </Hyperlink></TextBlock>
Hello,
Thanks for coming back. Not an elegent solution but works!
For others information I ended up customizing HyperLink Control.
HI,
I am attaching a new sample. the Cell has a grid with two rows. I the Hyperlink is equal to string.empty. I hide the textblock in the first row. If the Hyperlink exisits, then I hide the 2nd row of the grid.
Please review the new sample.
Sincerely,
Matt Developer Support Engineer
Matt/Anyone @ Infragistics?
Hi
I am still waiting for your response. Please let me know if this can not be done!
Matt, question is not about how it look and feel.
Question was; if you see the code where hyperlink tag is commented out, I have created the data trigger so that it shows the link when there is URL in the object and does not show the link when it has not URL. The problem is when you click on the link it is not clickable anymore.