views:

584

answers:

3

Is it possible to show multiple lines of text in grid cells using the .NET Compact framework? We need to create a grid where the middle column contains an address. We'd like to show this over multiple lines and (possibly) apply some formatting to the final line.

e.g.
123 Anywhere Street
Birmingham
B1 2DU
tel: 0123 555555

+1  A: 

You must override "OnPaint" method on the grid, or use some another grid ( I think the SourceGrid was in one of early version compatible wiht CF ).

.NET Framework has traditionaly not-so-good grid controls :(.

TcKs
A: 

Set AutoSizeRowsMode property in DataGridView control to DisplayedCells .

Additional info here : http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.autosizerowsmode.aspx

This is unsupported in the Compact Framework (and clearly documented in MSDN that way). If you don't know the answer, please don't answer.
ctacke
My bad , i missed that part about compact framework. Either way you dont have to be an asshole.
+1  A: 

Take a look at Ilya Tumanov's example of custom formatting data in the DataGrid. He does custom painting of cells in it.

ctacke