tags:

views:

427

answers:

0

I am using the WPF Toolkit's DataGrid, and I need one of the columns in the grid to display a hyperlink with static text that will just call an event handler in my code.

I don't want any data binding going on with this link, just the link itself displayed with static text for each record, e.g. "Delete". (The underlying purpose of the link will be to delete the selected record.)

So far, I am declaring my DataGridHyperlinkColumn as follows:

<toolkit:DataGridHyperlinkColumn>
   <toolkit:DataGridHyperlinkColumn.ElementStyle>
      <Style TargetType="TextBlock">
         <EventSetter Event="Hyperlink.Click" Handler="OnHyperlinkClick" />
      </Style>
   </toolkit:DataGridHyperlinkColumn.ElementStyle>
</toolkit:DataGridHyperlinkColumn>

However, I don't know how to set the actual text for the link. I've seen examples that use the Binding property, but none that are static. I can't seem to find any documentation or an example that is using this approach.

Thanks!