Witam, mam grida, który wyświetla mi dane z listy:
<DataGrid ItemsSource="{Binding Products}"
W jednej z kolumn chce mieć przycisk, który eksportuje mi konkretny produkt do pliku. Używam Commandingu.
<DataGridTemplateColumn Header="Export">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="Export" Command="{Binding ExportCommand}" CommandParameter="{Binding ID}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
I już to mi nie działa. Pewnie już moj pomysł jest zły. Mam w ViewModelu properte ExportCommand, której mi nie znajduje - pewnie dlatego, że szuka w liście Products... chyba nie do końca to rozumiem.