G
Grant Schenck
Hello,
I'm having a problem with a DataGridView header.
I have a form with a DataGridView.
In code I add a column. I set the AutoSizeMode to
DataGridViewAutoSizeColumnMode.ColumnHeader as shown here
comboBoxColumn.DataSource = dtStationList;
comboBoxColumn.DisplayMember = "Name";
comboBoxColumn.ValueMember = "StationListID";
comboBoxColumn.DataPropertyName = "StationListID";
comboBoxColumn.HeaderText = "Station List Name";
comboBoxColumn.AutoSizeMode =
DataGridViewAutoSizeColumnMode.ColumnHeader;
I end up with a header that has "Station" on the first line and "List Name"
on the second line. If I use "StationListName" as the header text then the
header is shown on one line.
So, how do I prevent the DataGridControl from putting my header on multiple
lines?
Thanks!
I'm having a problem with a DataGridView header.
I have a form with a DataGridView.
In code I add a column. I set the AutoSizeMode to
DataGridViewAutoSizeColumnMode.ColumnHeader as shown here
comboBoxColumn.DataSource = dtStationList;
comboBoxColumn.DisplayMember = "Name";
comboBoxColumn.ValueMember = "StationListID";
comboBoxColumn.DataPropertyName = "StationListID";
comboBoxColumn.HeaderText = "Station List Name";
comboBoxColumn.AutoSizeMode =
DataGridViewAutoSizeColumnMode.ColumnHeader;
I end up with a header that has "Station" on the first line and "List Name"
on the second line. If I use "StationListName" as the header text then the
header is shown on one line.
So, how do I prevent the DataGridControl from putting my header on multiple
lines?
Thanks!