The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator Syncfusion Team 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;
}
RVRachel VanWinkleOctober 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.