views:

278

answers:

2

Hello: The inclusion of DataGrid and DatePicker controls was announced for WPF in Framework 4, but when I access to VS2010 and I create a WPF proyect, I can not get these controls. What did I miss? Thanks.

A: 

I hope I understood your problem, so here we go... Instead of the DataGrid you can use the ListView with ListView.View set to a GridView. After this you have to create a couple of GridViewColumn objects, set their binding and then add them to the GridView.

I have an example of doing this (but i don't think it is the best one, because i'm kind of new to this programming stuff). If you want I could post it here.

Denis Rosca
WPF did not have DataGrid and datepicker controls in previous versions; to solve this situation a free tool called WPF Datagrid toolkit was implemented: http://wpf.codeplex.com/ . But for framework 4 it was announced that WPF would include its own DataGrid / datepicker implementation.
I was just looking at that web site. Looks promising, but i have no idea if it was included in v4.0.
Denis Rosca
There are native controls in the v4 Framework: http://msdn.microsoft.com/en-us/library/bb613588(v=VS.100).aspx#new_controls
Rowland Shaw
A: 

Have you made sure the target Framework is set to be v4? They should "just show" in the toolbox if you're targeting v4 of the framework.

Rowland Shaw
Rowland, the target was set to v3.5 sp1, I changed to V4 and all is OK!! My mistake ... Many Thanks!!