Hello,I have a datagrid with an attribute called snp_id.I would like to be able to click on that attribute in the datagrid, take the value of snp_id as a parameter to do something else.
</sdk:DataGridTemplateColumn>
<sdk:DataGridTemplateColumn Header="Zoom to Snap" CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto">
<sdk:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<!-- link to snap using the find -->
<HyperlinkButton x:Name="snp_link"
Click="findSnap_Click"
Content="{Binding Attributes[snp_id]}"
Tag="{Binding Attributes[snp_id]}"
VerticalAlignment="Center">
</HyperlinkButton>
</DataTemplate>
</sdk:DataGridTemplateColumn.CellTemplate>
</sdk:DataGridTemplateColumn>
In the code behind:
private void findSnap_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("you made it to the findsnap function: " + snp_lnk);
// find_waterright(snp_lnk);
}
I've also tried the Command instead of Click, but I think I botched it up badly and didn't get it to work.Thanks for any help you can provide.Dorothy