we can easily align our gridview cell value on load event like this
the output of the grid look like
Enjoy..
for (int i = 0; i < damageDetailsGridView.Rows.Count; i++)
{
damageDetailsGridView.Rows[i].Cells[0].HorizontalAlign = HorizontalAlign.Center;
damageDetailsGridView.Rows[i].Cells[1].HorizontalAlign = HorizontalAlign.Left;
damageDetailsGridView.Rows[i].Cells[2].HorizontalAlign = HorizontalAlign.Center;
}
the output of the grid look like
Enjoy..
Comments
Post a Comment