How to fix the column size of DataGridView in c#

Posted by Bageshkumarbagi under C# on 4/25/2013 | Points: 10 | Views : 4329 | Status : [Member] | Replies : 2
hi,

How to fix the column size of DataGridView in c#

Thanks,
Bagesh Kumar Singh
Mark as answer if you have been satisfied



Responses

Posted by: Satyapriyanayak on: 4/25/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
private void button1_Click(object sender, EventArgs e)
{
DataGridViewColumn column = dataGridView1.Columns[0];
column.Width = 80;
}

If this post helps you mark it as answer
Thanks

Bageshkumarbagi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nadeemshaik on: 5/1/2013 [Member] Starter | Points: 25

Up
0
Down
datagridview1.Columns[<index>].width =<somw value> like that u can set the width of columns

Bageshkumarbagi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response