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

MultiColumnComboBox Text Alignment

Thread ID:





59017 Apr 3,2007 01:47 PM UTC Apr 5,2007 10:19 PM UTC WinForms 1
Tags: Tools
John Slater
Asked On April 3, 2007 01:47 PM UTC

I need to set the text alignment for specific columns in a MultiColumnComboBox. Presently I have an EventHandler for the DropDown event so I can set the column widths (which works). I was also attempting (does not work) to set alignment as follows:
MultiColumnComboBox.ListBox.Grid.ColStyles[colname].HorizontalAlignment = GridHorizontalAlignment.Center;

I also have a GridPrepareViewStyleInfo EventHandler so I can set the Column Header Names. If I place the above snipet in this event handler it works, but the MultiColumnComboBox Grid flashes the text in the grid from left to centered.

Murugan [Syncfusion]
Replied On April 5, 2007 10:19 PM UTC


Please use GridPrepareViewStyleInfoEventArgs.Style.HorizantalAlignment to set the ColumnName horizantal alignment. Please refer to the below code snippet and let me know if it helps you.

private void Grid_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
e.Style.HorizontalAlignment = GridHorizontalAlignment.Center;


Thanks for using Syncfusion products.

Murugan P.S


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