1 回答
TA贡献1942条经验 获得超3个赞
您RowStyle将IsEnabled整行的属性设置为false。删除这个,Button应该启用:
<DataGrid Name="DgData" HorizontalAlignment="Left" Height="306" Margin="10,119,0,0" VerticalAlignment="Top" Width="637" Background="White">
<DataGrid.Columns>
<DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="Id" IsReadOnly="True" Visibility="Hidden"/>
<DataGridTextColumn Header="Datum" Binding="{Binding Date}" IsReadOnly="True" Width="100" CanUserResize="False"/>
<DataGridTextColumn Header="Doménové jméno" Binding="{Binding DomainName}" IsReadOnly="True" Width="105" CanUserResize="False"/>
<DataGridTextColumn Header="Druh" Binding="{Binding Relevance}" IsReadOnly="True" Width="65" CanUserResize="False"/>
<DataGridTextColumn Header="Kategorie" Binding="{Binding DomainName}" IsReadOnly="True" Width="65" CanUserResize="False"/>
<DataGridTextColumn Header="Popis" Binding="{Binding Content}" IsReadOnly="True" Width="200" CanUserResize="False"/>
<DataGridTemplateColumn MinWidth="100" Header="Poznámky" CanUserSort="True" CanUserResize="False">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Name="BtnShowNotes" IsEnabled="True" Click="BtnShowNotes_OnClick">Zobrazit</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
- 1 回答
- 0 关注
- 185 浏览
添加回答
举报