We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Header columns in a bound grid

Thread ID:

Created:

Updated:

Platform:

Replies:

917 Sep 3,2002 05:00 PM UTC Sep 3,2002 05:41 PM UTC Windows Forms 1
loading
Tags: GridControl
Glenn Doherty
Asked On September 3, 2002 05:00 PM UTC

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.

Clay Burch [Syncfusion]
Replied On 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; }

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;