tags:

views:

52

answers:

1

I am building a WPF Application using C# in VS 2008/.NET 3.5 SP1. I am trying to use the DataGrid control but when I create it in the XAML view the XML validator complains that the type is not found. Also, the IntelliSense list does not display an option for DataGrid.

According to the docs, it seems this control is not supported until .NET 4.0: http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid.aspx

How would I create a similar control in .NET 3.5 SP1?

+4  A: 

You can use the same DataGrid from WPF toolkit for .net 3.5 http://wpf.codeplex.com/releases/view/29117 The same control was included in .net 4.0

Alternativly you can use ListView control. It provides basic functionality similar to DataGrid. Can be fine for simple scenarious.

Andrii V
I have used and extensively styles/customised the ListView with the View property set to a GridView. There's not much you can't do with it. I would go that way too.
Kieren Johnstone