xaml datagrid 下面给了我两个额外的列,在 Image 列之前和 price 列之后。我怎样才能禁用它?
<DataGrid Name="dgProductList" AutoGenerateColumns="False" FontSize="18"
ScrollViewer.CanContentScroll="False"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto">
<DataGrid.Columns>
<DataGridTemplateColumn Header="Image">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Image Height="10" Width="10" Source="{Binding Picture}" Stretch="Uniform"></Image>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding Name}" Header="Item" />
<DataGridTextColumn Header="Qty" />
<DataGridTextColumn Binding="{Binding Price}" Header="Price" />
</DataGrid.Columns>
</DataGrid>
谢谢你。