0
爲什麼我在DataGrid
中看不到RadioButton
的列?爲什麼我的DataGridTemplateColumn和RadioButton在我的DataGrid中不可見?
<DataGrid x:Name="dg" Visibility="Visible" Margin="0,191,0,374" Width="1000" HeadersVisibility="Column" SelectionUnit="Cell" CanUserAddRows="False" AutoGenerateColumns="False" HorizontalAlignment="Left" Grid.ColumnSpan="2" Grid.RowSpan="2">
<DataGridTemplateColumn Width="85" Header="Kurs">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<RadioButton GroupName="DataGridChkBoxes" IsChecked="{Binding IsPresent2}" x:Name="rb" Content="rb" Width="50"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Nazwa}" Header="Nazwa" Width="300" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding KursZdarzenia}" Header="Kurs" IsReadOnly="True"/>
</DataGrid.Columns>
</DataGrid>