WPF: DataGridTemplateColumn not to affect the last row
-
11-12-2019 - |
Question
I am using .net4.0. I have a DataGrid with 5 cols. I added DataGridTemplateColumn to add "U" and "D" buttons for Update & Delete.
<DataGridTemplateColumn>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="U" ToolTip="Update" x:Name="btnUpdate" Click="btnUpdate_Click"></Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="D" ToolTip="Delete" x:Name="btnDelete" Click="btnDelete_Click"></Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
My last row in the grid is just for displaying total values of each col. I don't want the 2 btns in that last row of the grid. Is it possible to hide those btns of the last row.
I also want to have all text Bold of that last row.
How are both the above thigns possible ?
Solution
I added a proeprty and added a trigger in DataGridTemplate and this solved my issue.
Thanks for your time and efforts.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow