Reputation: 18353
The System.Windows.Controls.Data.DataGrid is used in my Silverlight application, but on attempt to add 'DataGridComboBoxColumn' column to the grid the following error messages are obtained:
Error 1 The tag 'DataGridComboBoxColumn' does not exist in XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data'. C:\Project\Budda\VFMElita\VfmElitaView\Pages\SquadView.xaml 140 22 VfmElitaView
Here is my "header" of the xaml-file:
Here is grid:
<StackPanel Grid.Row="1" Grid.Column="0" Grid.RowSpan="2">
<TextBlock Text="Поле"/>
<data:DataGrid AutoGenerateColumns="False" ItemsSource="{Binding FieldPlayers}">
<data:DataGrid.Columns>
<!--<data:DataGridTemplateColumn Header="#">
<data:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="4" Loaded="TextBlock_Loaded"/>
</DataTemplate>
</data:DataGridTemplateColumn.CellTemplate>
</data:DataGridTemplateColumn>-->
<data:DataGridTextColumn Header="№" Binding="{Binding Number}"/>
<data:DataGridComboBoxColumn> - that doesn't work
</data:DataGridComboBoxColumn>
</data:DataGrid.Columns>
</data:DataGrid>
</StackPanel>
What is required to get 'DataGridComboBoxColumn' workable? Seems like additional reference is required... but which library should be referenced?
Any help is welcome. Thanks.
Upvotes: 0
Views: 666
Reputation: 292735
If I'm not mistaken, DataGridComboBoxColumn
exists in WPF, not in Silverlight. Instead, you can use a DataGridTemplateColumn
, and define your own template with a ComboBox
Upvotes: 1
Reputation: 12954
Did you try running this msdn sample code with all the namespaces included
Upvotes: 0