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

Adam Haile
  • 30,705
  • 58
  • 191
  • 286
seanyboy
  • 5,623
  • 7
  • 43
  • 56

3 Answers3

1

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
  • 25,849
  • 11
  • 66
  • 104
1

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

ctacke
  • 66,480
  • 18
  • 94
  • 155
-4

Set AutoSizeRowsMode property in DataGridView control to DisplayedCells .

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

user21582
  • 190
  • 3
  • 6
  • 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 Sep 24 '08 at 12:28