AD
Administrator
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;
}
RV
Rachel VanWinkle
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.