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.

Drawing a marker when Margins are too large

Thread ID:

Created:

Updated:

Platform:

Replies:

33159 Aug 15,2005 12:37 AM Aug 15,2005 03:56 AM Windows Forms 1
loading
Tags: GridControl
Sue Harris
Asked On August 15, 2005 12:37 AM

Hi, I have a virtual grid control in which sometime the TextMargins are so large that the cell doesn''t display anything. In those cases I would like to draw a marker (ellipses or something) to indicate that the cell does have a value, it just can''t be displayed. However, I don''t get a DrawCellDisplayText event in these instances (because the cell renderer RemoveMargins returns an empty text rectangle), and the OnDrawItem and OnCellDrawn events don''t seem to provide quite enough information to be sure whether something was drawn. My best idea at this point is to include a flag in the DrawCellDisplayText event and if it isn''t set in the CellDrawn event to assume that I need to draw my marker. Do you have any suggestions or comments? Sue

Administrator [Syncfusion]
Replied On August 15, 2005 03:56 AM

There is a style.Trimming you can set to show ellipsis when text does not fit. But if there is no room in the textrectangle for the ellipsis + 1 char, the ellipsis will not display. And it sounds like you do not have this much space available to you. So, I think your solution will probably work. But in addition to checking whether your flag is set in CellDrawn, I think you would also want to test whether the style.FormattedText is positive length. Otherwise, I think you would be showing your ellipsis for empty cells as well as occupied cells that do not fit.

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.

;