Adjusting Gridview column width programatically

Debendra256
Posted by Debendra256 under ASP.NET category on | Points: 40 | Views : 359
Write the following code under gridview databound event

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
e.Row.Cells[0].Width = 161;
e.Row.Cells[1].Width = 161;
e.Row.Cells[2].Width = 161;

}

Comments or Responses

Login to post response