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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drawing a marker when Margins are too large

Thread ID:





33159 Aug 15,2005 04:37 AM UTC Aug 15,2005 07:56 AM UTC WinForms 1
Tags: GridControl
Sue Harris
Asked On August 15, 2005 04:37 AM UTC

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 07:56 AM UTC

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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon