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.

GridControl cell default text alignment

Thread ID:

Created:

Updated:

Platform:

Replies:

51307 Nov 2,2006 08:36 AM Nov 2,2006 11:34 PM Windows Forms 1
loading
Tags: GridControl
Edijs
Asked On November 2, 2006 08:36 AM

Hi!

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 2, 2006 11:34 PM

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,
Haneef

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.

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.

;