This is a migrated thread and some comments may be shown as answers.

How to AutoEllipsis when text too long

1 Answer 156 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
NorthGates
Top achievements
Rank 1
NorthGates asked on 14 Mar 2013, 05:36 AM
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;

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 Mar 2013, 01:36 PM
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.

Greetings,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Tags
PropertyGrid
Asked by
NorthGates
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or