Skip to content

DataGridView

j_sen21

Asked Dec 4, 2007, 7:07 AM EST1 answer
Share
LinkedInX

Hello is there an easy  way to set the column width in a datagridView.

There is a  DataGridViewAutoSizeColumnMode, but I dont know how to set the columns to

System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;

Im using :

dataGridView.DataSource = convertDStoList((m_ResultDS.Tables[sNodeParentText]), e.Node.Text);  to add the information to it.

Thanks

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0

    Got it!

    this.dataGridColumnView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;

    0