Problem : How do I set datagrid column text alignment in compact framework?

Problem : How do I set datagrid column text alignment in compact framework?

I can set header alignment in .NET CF, but I cannot find any documentation or examples of how to set text alignment for a data column (not the header).  I would greatly appreciate an example of how to do this.  Thanks


 

Solution: How do I set datagrid column text alignment in compact framework?

It appears that the Compact Framework System.Windows.Forms.DataGrid is based on the .NET 1.1 Windows Forms DataGrid, with DataGridTableStyle and DataGridColumnStyle. I remember that the 1.1 DataGrid was pretty lame, and the Compact Framework doesn’t even support all of the full version, so I understand your frustration.

I found this article, that references a sample custom DataGrid that provides an Alignment property for the column styles:

.Net Compact Framework V2 Service Pack 1 Data Grid control enhancements.
http://blogs.msdn.com/netcfteam/archive/2006/04/25/583542.aspx

“To use the sample, please download it here, rename the file so it has .msi extension and install it on to your PC. You would also need .Net Compact Framework V2 SP1 installed, currently available in Beta here.”

Download the sample from this link pointed to by the “here” link:
http://blogs.msdn.com/netcfteam/attachment/583542.ashx