This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Hi. Is it possible to expand DataGridView columns to fill 100% (horizontally) of the control? Currently my columns size dynamically based on the size of the data, but I want the columns to always take up 100% width.
Is that possible?Thanks
Hi Gacutil,
You can set AutoSizeColumnsMode property of the dataGridView to Fill , or use the following code .
this.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;