Reputation: 857
Hi I'm using WPFToolkit's Datagrid control. I can populate the datagrid. for some Column i've
used DataGridTextColumn and DataGridComboBoxColumn.
Now i would like to add a new Column (SubGraph). inside this Column there will be a Button in
some rows , if i click the button it should open a new tabItem with the corresponding
information for the specific row.
so should i define this Column in my XAML as a DataGridTextColumn or as DataGridHyperlinkColumn?
Upvotes: 1
Views: 71
Reputation: 7837
I'd use DataGridTemplate column instead of other and specify a template. Visibility you can handle by triggers perhaps. Depends on your logic
<toolkit:DataGridTemplateColumn Header="Timer" Width="50">
<toolkit:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="Start" Click="Button_Click" CommandParameter="{Binding}" />
</DataTemplate>
</toolkit:DataGridTemplateColumn.CellTemplate>
</toolkit:DataGridTemplateColumn>
Upvotes: 0