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. Image for the cookie policy date
close icon

GGC: indicate number too long for cell width

Hi,

I want to indicate that a number is too long for a certain cell width. This is similar to the Excel cells where it displays ### for cells that contains numbers too long to display. How can this be implemented in Syncfusion?

Thanks


1 Reply

HA haneefm Syncfusion Team November 12, 2007 06:18 PM UTC

Hi Patrick,

You can try setting the Style.Trimming property in the TableControlPrepareViewStyleInfo event of the grid. This will help you show ellipsis at the gridcells when the column width is not enough to display cell text. Below are the codes:

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

Best regards,
Haneef


Loader.
Live Chat Icon For mobile
Up arrow icon