Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
350
HyperLink Cell
posted

Hi,

 I would like to apply hyperlink to a cell.Is it possible? any samples?

 

 

 

 

Thanks in advance,

R.Ramesh Babu

Parents
No Data
Reply
  • 590
    Verified Answer
    posted

    <igDP:XamDataGrid> 

    <igDP:XamDataGrid.Resources>

    <Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="hyperlinkCell">

    <Setter Property="Template">

    <Setter.Value>

    <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">

    <TextBlock Margin="{TemplateBinding Padding}" VerticalAlignment="Center">

    <Hyperlink Click="itemSelected" Tag="{Binding}" >

    <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value}"/>

    </Hyperlink>

    </TextBlock>

    </ControlTemplate>

    </Setter.Value>

    </Setter>

    </Style>

    <igDP:XamDataGrid.Resources>

    <igDP:XamDataGrid.FieldLayouts>

    <igDP:FieldLayout>

    <igDP:FieldLayout.Fields>

    <igDP:Field Name="Name" Label="Name" >

    <igDP:Field.Settings>

    <igDP:FieldSettings AllowEdit="False" CellValuePresenterStyle="{StaticResource hyperlinkCell}" />

    </igDP:Field.Settings>

    </igDP:Field>

    </igDP:XamDataGrid.FieldLayouts>

    </igDP:XamDataGrid>

     

    This should do it.

Children
No Data