Question

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

Was it helpful?

Solution

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

OTHER TIPS

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 :(.

Set AutoSizeRowsMode property in DataGridView control to DisplayedCells .

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top