Today I was amazed when, after installing SP2003 SDK RTM, I opened an older Smartphone
project in VS.NET (created with a pre-RTM version of the SDK), and the compiler complained
that it could not find the DataGrid in System.Windows.Forms. And indeed, there was
none! On the other hand, it was there in my toolbox, and it was visible on my form.
What the heck was going on? Someone then told me (on a discussion list) that DataGrid
was not supported on Smartphone. Which did not explain how it got on my form earlier…
Anyway, there is a solution: since we are using the Compact Framework, and the DataGrid is supported
on the Pocket PC, why not use that one? After all, we have a common code base in .NET.
The DataGrid sits in its own assembly, System.Windows.Forms.DataGrid.dll (in the “…\CompactFrameworkSDK\v1.0.5000\Windows
CE\ directory), so I referenced that, and everything was fine.
Isn’t that cool? I LOVE .NET.