The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
How do I change the header alignment for a bound grid ? The grid is bound to a a collection and I'm autosizing the columns after the collection is loaded. However this places the column headers in the center of the column.
CBClay Burch Syncfusion Team September 3, 2002 05:41 PM UTC
In the current version, there is no style that you staticly set to affect the hedaer alignment. But you can handle the PrepareViewStyleInfo event and set the alignment there.
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
{
if(e.ColIndex > 0 && e.RowIndex == 0)
e.Style.HorizontalAlignment = GridHorizontalAlignment.Left;
}