DataGridView column autosize mode runtime

0
0

Hi all,

i’m unable to set autosize mode at run time. Setting it on the designer works fine.

 

I’m trying to fill columns only under some conditions.

 

I attached a small example (Wisej 2.0.24)

 

Thanks for any help!

Attachment
  • You must to post comments
0
0

Hi Levie,

your workaround works for the base example that i provide.

 

I have a more complex situation and i investigated further.

 

I attached to you another example, when there is a column with “Frozen = true” the fill property not working well.

 

I really appreciate your help

Thanks

 

  • You must to post comments
0
0

Hi Simone,

You are right,

We’ve logged the issue as #1876.  It will be available in the next release.

Here is a workaround:

dataGridView1.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

dataGridView1.Columns[1].Update();

Please let me know if this works for you,

Best regards,

Levie

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.