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

Removing text wrapping....

Thread ID:





48271 Aug 23,2006 06:35 PM UTC Aug 24,2006 12:00 PM UTC WinForms 3
Tags: GridControl
Sathish Chandran
Asked On August 23, 2006 06:35 PM UTC


My column header text is very lengthy, it is getting wrapped and get displayed. I don''t want the text to wrap. Instead, I would like to move the column header manually and see the text.
How to remove the text wrapping in my header column.

Please help me out.
Thanks & Regards,

Administrator [Syncfusion]
Replied On August 24, 2006 03:58 AM UTC

Hi Sathish,

Use this code to remove the wrapping in a Column Header cell.

this.grid.BaseStylesMap["Column Header"]. StyleInfo.WrapText = false;


Sathish Chandran
Replied On August 24, 2006 10:31 AM UTC

Hi Haneef,

Thanks for your reply. I wan''t to apply this for a row at one shot and also want to know how to apply for a particular cell.

Please help me out.

Thanks & Regards,

Administrator [Syncfusion]
Replied On August 24, 2006 12:00 PM UTC

Hi Sathish,

GridControl :

Please refer to the GridStyleInfoAtWork browser sample for more details.
\Syncfusion\Essential Studio\\windows\Grid.Windows\Samples\Quick Start\GridStyleInfoAtWork\cs


By default, DataBoundGrid doesn''''t store any style info properties. You can not set any cell or row specific properties for the DataBoundGrid other than the CellValue.You need to handle the PrepareViewStyleInfo (or Model.QueryCellInfo) Event to do this.Through this event you can set the style properties for the grid.

To set the WrapText for a cell, you check for the e.RowIndex/e.ColIndex, if that points to the row you desired, set the e.Style.WrapText for it. Here is some code snippet.

//PrepareViewStyleInfo or Model.QueryCellInfo event
GridCurrentCell cc = this.grid.CurrentCell;
if( e.RowIndex == 2 && e.ColIndex == 2 )
e.Style.WrapText = false;

For more details, See the below KnowledgeBase Articles:

Please let me know if this helps.


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