Hello Support,
We have a hyperlink column in the XamDataGrid. We need to allow the user to be able to copy the content of the hyperlink cell. We have applied the below CellValuePresenterStyle to XamDataGrid field. Please let us know what changes are required in the below style to able to copy the cell content.
Thank You.
<igDP:Field Name="ShipmentID" Label="Shipment ID"> <igDP:Field.Settings> <igDP:FieldSettings CellMinWidth="55" CellMaxWidth="55" LabelTextAlignment="Center" CellClickAction="SelectCell"> <igDP:FieldSettings.CellValuePresenterStyle> <Style TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <Grid> <TextBlock Margin="{TemplateBinding Padding}" VerticalAlignment="Center" HorizontalAlignment="Center"> <Hyperlink Name="hpLinkShipmentID" Click="hpLinkShipmentID_Click"> <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value}" HorizontalAlignment="Center"/> </Hyperlink> </TextBlock> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </igDP:FieldSettings.CellValuePresenterStyle> </igDP:FieldSettings> </igDP:Field.Settings> </igDP:Field>
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Thank you for your post. I have been looking into it and it seems like that you are not able to make a TextBlock’s Text selectable and since the Hyperlink should be placed inside a TextBlock you should use a TextBox styled like a TextBlock with Hyperlink. I created a sample project for you showing how to do so. Basically I make the TextBox read-only and now the text can be clicked if you hold down left control. If you need more help on this matter I can suggest you write on the Micorsoft’s forums since there you can get an answer from an MS expert.