DropDown Resizing
DropDownSizingMode
RadDropDownList supports different sizing modes, based on the DropDownSizingMode property of the control.
The SizingMode enumeration has the following members:
- None: no sizing is allowed.
Figure 1: SizingMode.None
SizingMode.None
- RightBottom: allows sizing in horizontal direction.
Figure 2: SizingMode.RightBottom
SizingMode.RightBottom
- UpDown: allows sizing in vertical direction.
Figure 3: SizingMode.UpDown
SizingMode.UpDown
- UpDownAndRightBottom: allows sizing in both directions.
Figure 4: SizingMode.UpDownAndRightBottom
SizingMode.UpDownAndRightBottom
Fixed size
You can specify a fixed height or width of the drop-down by setting the DropDownHeight and DropDownWidth properties.
Figure 5: DropDownHeight
DropDownHeight
Figure 6: DropDownWidth
DropDownWidth
You can set the DropDownMinSize property in order to specify the exact minimum height and width for the drop-down.
Figure 7: DropDownMinSize
DropDownMinSize
Auto size
The following example demonstrates a sample approach how to handle the RadDropDownList.PopupOpening event and achieve auto size functionality for the pop up in RadDropDownList:
Auto size drop down
Default pop up size | Auto sized popup |
---|---|
![]() |
![]() |
Displayed items
By default, RadDropDownList displays 6 items in the pop-up. In case you need to change this number you can set the DefaultItemsCountInDropDown property:
Figure 8: DefaultItemsCountInDropDown