Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var i=0;
- foreach (DataGridViewColumn c in dataGridView1.Columns)
- {
- i += c.Width;
- }
- dataGridView1.Width = i + dataGridView1.RowHeadersWidth + 2;
- dataGridView1.Height = dataGridView1.GetRowDisplayRectangle(dataGridView1.NewRowIndex, true).Bottom + dataGridView1.GetRowDisplayRectangle(dataGridView1.NewRowIndex, false).Height;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement