Author Topic: DataGridView behavior  (Read 1501 times)

0 Members and 1 Guest are viewing this topic.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
DataGridView behavior
« on: September 05, 2018, 12:38:42 AM »
Can anyone tell me why a DataGridView will not honor programmatically setting the width of the columns when it has a binding?

If I don't have a datasource, the resize event for the datagridview fires and resizes the two columns as I have instructed, as soon as I add dgv.DataSource = ds; the stupid thing no longer resizes when the resize event fires.

If I manually add the rows then it resizes correctly, but makes dealing with the data more difficult.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie