ASP.NET TUTORIALS
Wednesday, 23 April 2014
how to fix column width of gridview in asp.net ?
protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
for (int i = 0; i < gridView1.Columns.Count; i++)
{
e.Row.Cells[i].Attributes.Add("Style", "Width:25px");
}
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment