Datagrid control is missing in Toolbox. I tried to add it from WPF components, but it is not listing there also. And iam using 3.5 framework
+1
A:
Instead of a Datagrid, I have used a ListView which contained a GridView. Here is the tutorial I started from. (Haven't worked very much with Datagrid, so I don't know if there are any big differences)
A simplified version of what I'm workign with is:
<ListView ItemsSource="{Binding}" x:Name="lstItems"
PreviewMouseLeftButtonDown="lstActions_PreviewMouseLeftButtonDown"
PreviewMouseLeftButtonUp="lstActions_PreviewMouseLeftButtonUp">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="Height" Value="30" />
</Style>
</ListView.ItemContainerStyle>
<ListView.View>
<GridView x:Name="gridView">
<GridViewColumn Width="140" Header="Name" DisplayMemberBinding="{Binding DisplayName}" />
<GridViewColumn Width="240" Header="Description" DisplayMemberBinding="{Binding Description}" />
</GridView>
</ListView.View>
</Listview>
Rox
2010-10-27 12:02:40