Löschen Knopf
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
d:DataContext="{d:DesignInstance Type=local:MainWindowViewModel, IsDesignTimeCreatable=False}"
|
||||
Title="{Binding Path=MainWindowTitle}" Height="450" Width="800">
|
||||
<StackPanel>
|
||||
<DataGrid Name="dgTest"
|
||||
<DataGrid x:Name="fahrzeugTabelle"
|
||||
CanUserAddRows="False"
|
||||
CanUserDeleteRows="False"
|
||||
CanUserSortColumns="True"
|
||||
@@ -18,6 +18,13 @@
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="ID" Binding="{Binding Path=Id}"/>
|
||||
<DataGridTextColumn Header="Name" Binding="{Binding Path=Name}"/>
|
||||
<DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding ElementName=fahrzeugTabelle, Path=DataContext.LoeschenKommando}" CommandParameter="{Binding}">Löschen</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
|
||||
Reference in New Issue
Block a user