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

DropDownList size/length/displayed item count (Solution)

0 Answers 142 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Holger Boskugel
Top achievements
Rank 2
Holger Boskugel asked on 16 Jul 2012, 12:54 PM
Hello,

I looked sometimes for a solution to change the count of items displayed in the Popup of the RadDropDownListEditorElement.

My solution now is:

Use of EditorRequired event from RadPropertyGrid, Setting the editor to RadDropDownListEditor. Getting the EditorElement as RadDropDownListEditorElement and define the MinSize of Popup as follows:

RadDropDownListEditor editor = new RadDropDownListEditor(); 
RadDropDownListEditorElement element = editor.EditorElement as RadDropDownListEditorElement; 
  
element.Popup.MinimumSize = new System.Drawing.Size(element.Popup.MinimumSize.Width, 
                                        element.ItemHeight * 10); 
  
editor.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; 
e.Editor = editor;

where as 10 ist the count of items to be displayed.


Regards from Leipzig

Holger

No answers yet. Maybe you can help?

Tags
PropertyGrid
Asked by
Holger Boskugel
Top achievements
Rank 2
Share this question
or