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

How to set AutoEllipsis mode when text exceeds width of the cell?

Platform: WinForms |
Control: GridControl |
Published Date: May 18, 2016 |
Last Revised Date: May 28, 2019
Tags: editing

By default, when the content of the cell exceeds to the cell’s size then the text is automatically wrapped in to the next line. To show the Ellipsis word like the ‘…’ at the end of the text, the Trimming property can be set as EllipsisWord.

Code Snippet

C#

//To enable Trimming for whole grid. 
this.gridControl1.TableStyle.Trimming = StringTrimming.EllipsisWord;
 
//To enable Trimming for a particular cell.
this.gridControl1[rowIndex, colIndex].Trimming = StringTrimming.EllipsisWord;
 
//To enable Trimming for a column.
this.gridControl1.ColStyles[colIndex].Trimming = StringTrimming.EllipsisWord;
 
//To enable Trimming for a row.
this.gridControl1.RowStyles[rowIndex].Trimming = StringTrimming.EllipsisWord;
 

 

VB

'To enable Trimming for whole grid. 
Me.gridControl1.TableStyle.Trimming = StringTrimming.EllipsisWord
 
'To enable Trimming for a particular cell.
Me.gridControl1(rowIndex, colIndex).Trimming = StringTrimming.EllipsisWord
 
'To enable Trimming for a column.
Me.gridControl1.ColStyles(colIndex).Trimming = StringTrimming.EllipsisWord
 
'To enable Trimming for a row.
Me.gridControl1.RowStyles(rowIndex).Trimming = StringTrimming.EllipsisWord
 

 

Showing ellipsis word in GridControl

 

Sample Link:

C#: AutoEllipsisMode_CS

VB: AutoEllipsisMode_VB

 

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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