User1979
User1979

Reputation: 857

Generated Column Type

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

Answers (1)

Artiom
Artiom

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

Related Questions