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.
Unfortunately, activation email could not send to your email. Please try again.

Adjusting Cell Text

Thread ID:

Created:

Updated:

Platform:

Replies:

16499 Jul 16,2004 10:40 AM Jul 16,2004 11:32 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On July 16, 2004 10:40 AM

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

Administrator [Syncfusion]
Replied On July 16, 2004 11:18 AM

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

Administrator [Syncfusion]
Replied On July 16, 2004 11:32 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;