[Mono-winforms-list] DataGridView setting column width problem

sa5webber sa5webber at yahoo.com
Wed Mar 21 02:04:05 UTC 2012

I have a datagridview with 4 columns. The first 3 I've tried to set to a
fixed column width and the last one to a fill as shown below. This works
correctly with MS .net. In mono it distributes the 4 columns into equal
widths. In other words it seems to ignore the AutoSizeMode and width
settings. Anybody have any suggestions?

  dgvLog.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
  dgvLog.Columns[0].MinimumWidth = 140;
  dgvLog.Columns[0].Width = 140;
  dgvLog.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
  dgvLog.Columns[1].MinimumWidth = 70;
  dgvLog.Columns[1].Width = 70;
  dgvLog.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
  dgvLog.Columns[2].MinimumWidth = 70;
  dgvLog.Columns[2].Width = 70;
  dgvLog.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

View this message in context: http://mono.1490590.n4.nabble.com/DataGridView-setting-column-width-problem-tp4491058p4491058.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.

More information about the Mono-winforms-list mailing list