Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
help with overflow in text elements
posted

i've set the following property on my grid:

  • grid.DisplayLayout.Override.CellAppearance.TextTrimming = TextTrimming.EllipsisCharacter;

now say i put the following value into it:

  • 872.143

case (1) - if the cell is really small, it does the following (which i like):

  • 87...

case (2) - if the cell is a little bigger, it does the following (i don't like this):

  • 872.1...

if it's big enough to display that elipsis, i'd rather it display another digit of precision after the decimal place.

with case (1) i'm ok sacrificing precision to get the ellipsis because otherwise the user has no means of knowing whether that says 872 or 87234591.

but with case (2), the user can see the decimal point so s/he knows the absolute size of the number in there (can't confuse 872 with 8725897) 

case (3) - sometimes i get this:

  • 872....

in this case (3) there are four periods because the decimal place is right next to the ellipsis. this is confusing.

what i'd like is these cases to show:

  1. 87...
  2. 872.14
  3. 872.1
in cases (2) and (3) the user could expand the column to see the less-significant digits in the number.

any advice?

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    The TextTrimming is done by the DotNet Framework GDI+ text drawing methods. So we really don't have any control over this, other than passing in an option that says to show an ellipsis if the text doesn't fit. 

    So the only way you could do something like this would to use a DrawFilter and draw the text yourself. You would have to measure the text to determine what fits and then draw it yourself using GDI+ in code. 

     

Children