I've created a button column successfully based on the following post, including adding text to the individual buttons:
How to add a button to a column in the DataGridView
The problem is, my text won't fit on a single line, so I'm hoping to create a multiline button label.
Here is the code I'm using to define the column, but the Environment.Newline doesn't seem to work on these buttons. Is there a way to create multiline button label for datagridview buttons and, if so, how?
Dim inspectionNotesButtonCol As New DataGridViewButtonColumn With {
.Name = "InspNotesButton",
.HeaderText = "Insp." + Environment.NewLine + "Notes",
.Text = "Insp." + Environment.NewLine + "Notes",
.UseColumnTextForButtonValue = True,
.Width = 50
}
Me.dgvIssues.Columns.Add(inspectionNotesButtonCol)
Answers in either C# or vb.net are appreciated.