.net - Data Table not Allowed to resize column -


i have datagridview in vb app. cannot resize columns. populate datagridview datatable. property of datagridview (allowusertorezisecolumn) set true.

enter image description here

i can resize in red circle green check beside it. seems rest of data table. insight?

populate datagrid code

using conn sqlconnection = new sqlconnection(connectionstring)     conn.open()     using comm sqlcommand = new sqlcommand(sqlquery, conn)         dim rs sqldatareader = comm.executereader         dim dt datatable = new datatable         dt.load(rs)         datgdxlog.datasource = dt     end using 'comm     conn.close() end using 'conn 

i reiterate allowusertoresizerows in prepaint

 datgdxlog.allowusertoresizecolumns = true         if datgdxlog.rows.count >= 3             if datgdxlog.rows(e.rowindex).cells(3).value >= 3                 datgdxlog.rows(e.rowindex).defaultcellstyle.forecolor = color.red             end if         end if 

i believe problem fact data table. makes me think datagridview properties not control this, can reorder column headers when change property (allowusertoordercolumns) true.

take @ dgv columns' datagridviewcolumn.autosizemode property values.

make sure they're set either datagridviewautosizecolumnmode.none or datagridviewautosizecolumnmode.notset.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -