c# - Strange VS2010 behavior with datagrid and designer -


i working on winforms app datagridview control on it, , experiencing frustrating things.

first off, want turn off autocolumngeneration, it's not listed in properties. no problem, can line of code...and gets weird:

  1. in code, datagridview inaccessible. doesnt exist on form. looking this, because designer declaring part of initializecomponent() method instead of initializes other controls.

  2. because in designer, change make there gets reversed can't fix this.

is there way stop visual studio doing this? found hack around using 1 of datagrid columns (which accessible) create reference datagridview associated , access way. works, ugly , not intuitive @ all.

i think found it:

in designer, click on datagridview control, , change property of generatemember true. i'm guessing set false.

that property used that: hide control code windows. it's useful labels or toolstripseparators don't need deal in code.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -