How can i turn on ellipsis text at cell header


Hi

How can i turn on ellipsis text at cell header as so whenever width of column is small enough to display text, the text would turn to ellipsis (...)

Regards,
Ubaid Tariq

1 Reply

RA Rajagopal Syncfusion Team June 7, 2007 05:55 PM UTC

Hi Ubaid,

Please try the code below in the PrepareViewStyleInfo event of the grid. This will help you show ellipsis at the headers when the column width is not enough to display header text.

void grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if (e.RowIndex == 0 && e.ColIndex > 0)
{
e.Style.WrapText = false;
e.Style.Trimming = StringTrimming.EllipsisCharacter;
}
}

Regards,
Rajagopal

Loader.
Up arrow icon