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. Image for the cookie policy date

how to set horizontal alignment in a GridList Control

Hello Team, 

I am using GridListControl but I can't set the horizontal alignment to center of one column, I try with:


GridListControl1.Grid.Model.ColStyles(1).HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Center


But this doesn't work.



1 Reply

AK Arun Kumar V Syncfusion Team September 30, 2013 03:47 AM UTC

Hi Carlos,

Thanks for your interest in Syncfusion products.


set the horizontal alignment to center of one column

Thanks for sharing the information. You could make use of the following Querycellinfo event. This event will be triggered continuously. So please make use of the following event.


Code Snippet:

this.gridListControl1.Grid.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(Model_QueryCellInfo);

void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)


if (e.ColIndex == 5)


e.Style.HorizontalAlignment = GridHorizontalAlignment.Center;




Please let me know if you have any concerns.



Live Chat Icon For mobile
Up arrow icon