How to AutoEllipsis when text too long

2 posts, 0 answers
  1. NorthGates
    NorthGates avatar
    13 posts
    Member since:
    Oct 2012

    Posted 14 Mar 2013 Link to this post

    How can I enable AutoEllipsis of grid element, grid text and help area, I tried below (set in my form New() event) but I must be missing a flag somewhere.

    grd.PropertyGridElement.AutoEllipsis = true;
    grd.PropertyGridElement.AutoToolTip = true;
  2. Stefan
    Stefan avatar
    2911 posts

    Posted 18 Mar 2013 Link to this post

    Hi Luc,

    Thank you for writing.

    I am not sure where exactly you want to set AutoEllipsis - what do you mean with grid element and grid text. Can you please indicate those areas on a screen shot and get back to me with it?

    In general, the text of the properties is with AutoEllipsis set to true. To do that for the value of the properties, you have to use the ItemFormatting event:
    void radPropertyGrid1_ItemFormatting(object sender, PropertyGridItemFormattingEventArgs e)
        ((PropertyGridItemElement)e.VisualElement).ValueElement.AutoEllipsis = true;

    To enable AutoEllipsis of the help area, you need to set AutoEllipsis to true of the HelpContentElement. In addition, you might want to stop the text wrapping. Here is a sample
    radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.HelpContentElement.TextWrap = false;
    radPropertyGrid1.PropertyGridElement.SplitElement.HelpElement.HelpContentElement.AutoEllipsis = true;

    I am looking forward to your reply.

    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Back to Top