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

Adjusting Cell Text

Maybe I''m going about this the wrong way. I''m trying to change the text in TextBox cells such that if the text must be truncated, that the truncated text is appended with elipsis (...). To do this, I''ve created a model an renderer derived from the TextBox defaults. My hope was simply to calculate if the text needs truncation, and if so, calculate how much to show with the elipsis in the OnDraw() method. The problem is that the base.OnDraw appears to get the text from GridCellModelBase.GetFormattedOrActiveTextAt(). This poses a problem since it''s not overrideable and I don''t know if I''ll have the information I need to calculate the text width. Is there a simple way to do this before I go off and code the entire drawing code (which I REALLY, REALLY don''t want to have to do). Thanks. Pete

2 Replies

AD Administrator Syncfusion Team July 16, 2004 03:18 PM UTC

Try setting this style property for the cell to see if that will give you what you want. style.Trimming = StringTrimming.EllipsisWord;

AD Administrator Syncfusion Team July 16, 2004 03:32 PM UTC

Clay, that looks like it''s close enough. Thanks.

Live Chat Icon For mobile
Up arrow icon