DataGridView Column Resize

0
0

Hello, i do not know if that was a bug or done on purpose, but after render a datagridview, i will change the width of columns by code, it works perfectly, but if i change manualy (visual) a width, when i try to change again by code the width, the column that i change it manualy do not change with the code width but remain with the manual width.

That was a bug or exist some solution?

  • You must to post comments
0
0

Hi,

WJ-8985 is fixed in Wisej dev build (1.4.99).

Best regards
Frank

    • Guest
    • Jun 20, 2018 - 6:56 am
    hi, updated and works, thanks
  • You must to post comments
0
0

Ok, Thanks, waiting for the fixing

  • Tiago (ITG)
    It’s already fixed and will be available on the next release.
  • You must to post comments
0
0

Hi again,

While we fix the issue, you can use a workaround:

Insert an extra line before setting the Width value you want, like this

Snippet

((Wisej.Core.IWisejComponent)dataGridView1.Columns[0]).Configuration.width = 0;
dataGridView1.Columns[0].Width = 300;

 

  • You must to post comments
0
0

Thanks for the sample. I could reproduce. Logged as WJ-8984.

  • You must to post comments
0
0

Hi,

here is a test sample that used in video, where i added an another button that set the width of the first column at 300.

if do as in the video, you can see this problem, after button click and change width with mouse, the second click on button don’t change the width visually.

if i first time change with mouse the width, hit one of the button it works, after that when change again with mouse and hit one of buttons is stop works, but, if i hit one button then the other it restart works, i can’t understand where is the problem, and why when i do in the for(columns) loop the column update it didn’t work but in the ColumnWidthChanged Event column update yes.

I hope i have expressed myself well

Attachment
  • You must to post comments
0
0

Hi,

Can you attach a sample?

Thanks.

  • You must to post comments
0
0

Hi,

i tested and same problem, i registered a little video where show the problem, try to explain: the first time when use the mouse to change the width and after that hit the button it works, but after that (hitting the button) if change again with mouse the width and retray to hit the button it did not works,  even if at the code level the width was changed.

I tryed to do DGV Refresh(), Update(), column update and nothing; but yesterday i will found i little solution that it would seem work, intercept the ColumnWidthChange Event, and here do a column Update().

 

Attachment
  • You must to post comments
0
0

Hi,

I have tried this with a small sample (attached) but could not reproduce.
After starting the test app I resized the first column using the mouse and then hit the button.
It works ok.

Can you please check if these are the correct steps and provide some test code and a detailed description
how to reproduce the problem ?

Thanks in advance.

Best regards
Frank

Attachment
  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.