Tuesday, June 19, 2012

ASP.NET Gridview cell value alignment

we can easily align our gridview cell value on load event like this

  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


SQL Get all Index create script from Database

To get all script from database as a create new index into another database you can use the following --Get all Index Script SELECT...