0

I am trying to create a WPF toolkit datagrid with following format. I was able to hide content for the columns in LoadingRow event of the data grid. But the last column is a button and not sure how I can hide the content for that. It should only displayed once per each name. Any suggestions on how to accomplish this ?

enter image description here

Thanks DM

dcmovva
  • 155
  • 1
  • 3
  • 10

1 Answers1

0
<DataGridTemplateColumn>
    <DataGridTemplateColumn.CellTemplate>
        <DataTemplate>
        <Button Content="Delete"
               Visibility="{Binding CanDelete, Converter={StaticResource BoolToVisibility}}"/>
        </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

CanDelete is a bool property on your Row Binding on your List , change it to true when needed PropertyChanged + Binding will do the rest.

denis morozov
  • 6,236
  • 3
  • 30
  • 45