Untuk beberapa alasan saya tidak dapat menyembunyikan DataGridColumn WPF Toolkit. Saya mencoba melakukan hal berikut:
<dg:DataGridTemplateColumn Header="Item Description" Visibility="{Binding IsReadOnly}">
<dg:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBox Text="{Binding Path=ItemDescription}" />
</DataTemplate>
</dg:DataGridTemplateColumn.CellTemplate>
This doesn't work, since it's looking for a IsReadOnly property on the ItemSource (not a property of the current class). If add this as a property of the ItemSource class that implements INoifyPropertyChanged, it still doesn't hide the column. Is there a way around this? I want the column to hid when a button click changes IsReadOnly property.
Asumsikan IsReadOnly mengembalikan nilai Visibilitas dan merupakan properti ketergantungan
Saya benar-benar buntu, saya sangat menghargai bantuannya! Terima kasih banyak!