c# - Setting AutoGenerateColumns property from VS 2012 -


just got strange problem , wonder if there miss in vs2012 solve it. i'm working mdi windows forms , have datagridview retrieve data database , set datasource property of grid data database. though use old project scaffold one, datagridview designed in vs2012 , next data database if it's part datagridview design except header columns names of columns database.

however did little reearch , find out in fact problem solved setting autogeneratecolumns property false. can't find property in vs2012 designer. i'm using :

        dgvclients.autogeneratecolumns = false;         dgvclients.datasource = maingridinfolist; 

in load event i'd rather prefer use designer (if possible of course) , remove line - dgvclients.autogeneratecolumns = false; code. problem can't see property exact name datagridview wonder - name changed? kinda strange because can still use in code, or there never way ide designer , must written in source code explicitly?

p.s

it occurs using ide designer not decision particular problem (at least think so) here printscreen can show how set property vs2012 designer.

autogeneratecolumn

i found in documentation might question.

from datagridview.autogeneratecolumns property:

note:

setting datasource in windows forms designer automatically sets autogeneratecolumns property false , generates code add , bind column each property in data source. code generated @ design-time equivalent manually added code shown in following example. not same auto-generation of columns @ run-time occurs when autogeneratecolumns property set true.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -