I have a table with two columns (column1 and column2). I want to resize each column with his own size. Then I try to write this line of code but its resize all the columns. Please solve it fo me. Thanx!
private void dgvpeople_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
{
e.Column.Width = 30;
}
Abhishek KumarPosted Sep 15, 2014, 9:36 AM
Please try this.
DataGridViewColumn column = grdTest.Columns[0];
column.Width = 30;
Hope this will help.
Abhishek
Mfwamba TshimangaPosted Sep 17, 2014, 3:56 AM
IsraelPosted Sep 15, 2014, 12:08 PM
I do this:
IsraelPosted Sep 15, 2014, 9:21 AM
Dipankar BiswasPosted Sep 15, 2014, 8:23 AM