When no data is entered into combobox, Width of the combobox is covering all the remaining Options (overlapping)
Dess | Tech Support Engineer, Principal
Telerik team
commented on 29 Mar 2022, 12:51 PM
Hi, Naresh,
According to the provided information, it is difficult to understand what is the exact undesired behavior that you are facing. Could you please elaborate? A sample screenshot would be very useful for illustrating the observed overlapping. It would be also greatly appreciated if you can provide a sample code snippet showing the setup you have in the project.
By default, when RadDropDownList is empty, it shows an empty drop down:
The default popup's height depends on the DefaultItemsCountInDropDown and the ItemHeight. If you want to shrink the drop down when no items exist, you can specify the DropDownMaxSize property:
if (this.radDropDownList1.Items.Count==0)
{
this.radDropDownList1.DropDownMaxSize = new Size(this.radDropDownList1.Width,10);
}
if I give DefaultItemsCountInDropDown = 6 , How to I adujust can you share solution
Dess | Tech Support Engineer, Principal
Telerik team
commented on 04 Apr 2022, 05:45 AM
Naresh, If you set the DefaultItemsCountInDropDown property to 6, you are still allowed to specify the DropDownMaxSize property in order to shrink the empty popup:
this.radDropDownList1.DefaultItemsCountInDropDown = 6;
this.radDropDownList1.PopupClosing+=radDropDownList1_PopupClosing;
if (this.radDropDownList1.Items.Count==0)
{
No answers yet. Maybe you can help?
Tags
ComboBox and ListBox (obsolete as of Q2 2010)DropDownList
Hi, Naresh,
According to the provided information, it is difficult to understand what is the exact undesired behavior that you are facing. Could you please elaborate? A sample screenshot would be very useful for illustrating the observed overlapping. It would be also greatly appreciated if you can provide a sample code snippet showing the setup you have in the project.
Thank you in advance for your cooperation.
Here I'm adding Snapshot, Please find
Hi Team,
If understood issue, can you suggest any solution for that.
How to remove blank lines from a combobox
Hello, Naresh,
By default, when RadDropDownList is empty, it shows an empty drop down:
The default popup's height depends on the DefaultItemsCountInDropDown and the ItemHeight. If you want to shrink the drop down when no items exist, you can specify the DropDownMaxSize property:
if (this.radDropDownList1.Items.Count==0) { this.radDropDownList1.DropDownMaxSize = new Size(this.radDropDownList1.Width,10); }
Naresh,
If you set the DefaultItemsCountInDropDown property to 6, you are still allowed to specify the DropDownMaxSize property in order to shrink the empty popup:
this.radDropDownList1.DefaultItemsCountInDropDown = 6; this.radDropDownList1.PopupClosing+=radDropDownList1_PopupClosing; if (this.radDropDownList1.Items.Count==0) {