Onteora Software

Ken Tucker's Blog
posts - 145, comments - 629, trackbacks - 0

October 2007 Entries

Compact Framework DataGrid Alternating Color

One of the things I miss from the Windows Forms DataGrid is the ability to have the rows alternating in color.  For this example I created a custom DataGridTextBox column which will display each other row in an different color. Basically I override the paint method to call the existing paint method with a different back color brush for every other column.   Public Class AltColorColumn     Inherits DataGridTextBoxColumn     Private m_AltColor As Color     Public Property AltColor() As Color         Get             Return m_AltColor         End Get         Set(ByVal value As Color)             m_AltColor = value         End Set     End Property     Protected Overrides Sub...

posted @ Friday, October 19, 2007 1:44 PM | Feedback (1) | Filed Under [ Compact Framework Vista ]

Formatting the Output in a Compact Framework DataGrid

Recently I got a new windows mobile 6 Pocket PC phone.  The datagrid provided in the Compact Framework is a very limited version of the Windows Forms DataGrid.  Here is an example which will format the output of a datagrid.  The windows forms datagrid has a GetColumnAtRow which you can override to return the formatted data.  In the compact framework version you need to override the paint method to draw the formatted data in the datagrid.  Note use the columns PropertyDescriptor's GetValue method to get the cells value.  For this example I created a new column which converts true false...

posted @ Thursday, October 18, 2007 9:57 PM | Feedback (1) | Filed Under [ Compact Framework VB ]

Dry Dock

The past few weeks the ship I work on has been in dry dock.  I hope to be home in about a week and start adding some new blog entries soon.

posted @ Thursday, October 11, 2007 12:00 AM | Feedback (2) | Filed Under [ General ]

Powered by: