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


Enjoy..

vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link. http://www.microsoft.com/download...