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

Stifu stifu at free.fr
Wed Mar 21 18:45:37 UTC 2012


Hi,

I was gonna post a link to bug 590, then realized you're the one who posted
it.
Well, it's just a bug that needs to be fixed, can't say much more than that.
If you're feeling adventurous, feel free to dig into the Mono source code.
That's how I fixed my WinForms pet bugs. Let me know if I can help you
getting started.


sa5webber wrote
> 
> 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-tp4491058p4493320.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.


More information about the Mono-winforms-list mailing list