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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl cell default text alignment

Thread ID:





51307 Nov 2,2006 01:36 PM UTC Nov 3,2006 04:34 AM UTC WinForms 1
Tags: GridControl
Asked On November 2, 2006 01:36 PM UTC


I use GridExcelConverterBase.ExcelToGrid method to get GridModel collection from IWorkbook.

When I assign GridModel to GridControl and display it, then those cells, that has no alignment set, are displayed "Center" aligned.
MS Excel in such situations displays text "Left" aligned.

How to change this default GridControl cell alignment to set default text alignment to "Left"?

Thanks in advance!

Administrator [Syncfusion]
Replied On November 3, 2006 04:34 AM UTC

Hi Edijs,

Use the .HorizontalAlignment property of the GridStyleInfo object to specify the horizontal cell text alignment in a grid. Here is a code snippet.

this.gridControl1.TableStyle.HorizontalAlignment = GridHorizontalAlignment.Center;

//specify the horizontal cell text alignment in a grid
//this.gridControl1.TableStyle.VerticalAlignment = GridVerticalAlignment.Top;

Best Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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