Window designer doesn't match with code

0
0

Hi everyone,

I was trying to use DataGridView in a form, and I added a column and playing with properties to see how it works I found that the designer doesn’t match the code. I mean, when I set ReadOnly=true the change it takes effect but when I go back to set ReadOnly=false, this one doesn’t make the change in the code. I’m using the latest version 1.4.50 released by Nov.  I added some pictures so you can see the issue.

Regards.

Attachment
  • You must to post comments
0
0

I’m not sure I understood. When you say “I go back to set ReadOnly=false” do you mean that you set the property back to false and then it disappears from the designer code? If that’s the case it’s normal since the default value is false.

I just tried to set a column ReadOnly=true by hand in InitializeComponent(), opened the designer, and the property is correctly shown to be true. Did I miss something?

  • Carlos Lino
    Try to do the same but vice versa, I mean, first make the change in the columns editor(second pic I sent) and then take a look at the designer. Do it like 3 or 4 times changing the value but in the way that I’m telling you and you will see.
  • Luca (ITG)
    Tried, but still can’t reproduce. When you switch to code view, change the code, go back to design view? Try to save first. Or close the design view, save and reopen design view.
  • Carlos Lino
    Oh yes, doing that way that you said it works. Well, I thought it was the same than “winform”. In winform you don’t need to close de designer but anyway thank you for your help.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.