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

Header Text EllipsisCharacter Trimming

Thread ID:

Created:

Updated:

Platform:

Replies:

1258 Oct 8,2002 05:51 PM UTC Oct 9,2002 10:25 AM UTC WinForms 2
loading
Tags: GridControl
Rachel VanWinkle
Asked On October 8, 2002 05:51 PM UTC

I am having a problem getting the header text to trim using the ellipsisCharacter method. I just edited the header base style to use this trimming method in the trimming property. However when you run the app it just cuts off the header text with a character not an ellipsisCharacter when the column is resized by the user.

Administrator [Syncfusion]
Replied On October 9, 2002 06:22 AM UTC

StringTrimming is not supported for CellType "Static" which is what standard column headers are. If you change the CellType to "TextBox" then you can get the trimming to work, but then (unless you want the user to be able to edit the header text), you have to prevent the cell going into edit state by handling CurrentCellStartEditing. So, to allow the header in column 2 to trim, you could use code such as: gridControl1[0,2].Text = "This is a long title"; gridControl1[0,2].WrapText = false; gridControl1[0,2].CellType = "TextBox"; gridControl1[0,2].Trimming = StringTrimming.EllipsisCharacter; gridControl1[0,2].CellAppearance = GridCellAppearance.Raised; //.... private void gridControl1_CurrentCellStartEditing(object sender, System.ComponentModel.CancelEventArgs e) { if(gridControl1.CurrentCell.RowIndex == 0) e.Cancel = true; }

Rachel VanWinkle
Replied On October 9, 2002 10:25 AM UTC

Thanks for the help, it works like a charm! I didn't realize string trimming didn't work for static cells.

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.

Please sign in to access our forum

or the page will be automatically redirected to 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

;