To get cell text to word wrap is easy once you know the combination of properties to set:
DataGridView > AutoSizeRowsMode = AllCells
DataGridView > Columns > *Your Column* > Default Cell Style > Wrap Mode = True
DataGridView > Columns > *Your Column* > AutoSizeMode = DisplayedCells
Showing posts with label datagridview. Show all posts
Showing posts with label datagridview. Show all posts
Thursday, November 11, 2010
Friday, July 16, 2010
DataGridView Adds Extra Columns
The AutoGenerateColumns property is not available on the design surface of VS, only in code. What a pain. So, to prevent columns from displaying:
Public Sub New() '// or whatever
my_data_grid_view.AutogenerateColumns = False
End Sub
Public Sub New() '// or whatever
my_data_grid_view.AutogenerateColumns = False
End Sub
Subscribe to:
Posts (Atom)