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

Performance of RadCombobox vs ASP Dropdownlist

1 Answer 205 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
toi
Top achievements
Rank 1
toi asked on 09 Dec 2008, 10:07 AM
Hi Telerik team,

I have some problem about performance of RadComboBox. I try to bind 1000 rows to both RadComboBox and ASP DropdownList.
Then select the item by use arrow up and down to compare the performance of both.

The result I got is the RadCombobox is very slow reaction on my key press but not in ASP DropdownList.

Any suggestion for this problem?


.ASPX

RadComboBox:

 

<telerik:RadComboBox ID="RadComboBox1" runat="server" Width="200px" Height="200px"

 

 

AllowCustomText="false" ShowToggleImage="True" ShowMoreResultsBox="true"

 

 

EnableLoadOnDemand="True" MarkFirstMatch="True"

 

 

EnableVirtualScrolling="true" >

 

 

</telerik:RadComboBox>

 

 

 

<br />

 

 

ASP Dropdownlist:

 

<asp:DropDownList ID="dd" runat="server" DataTextField="ClientID"

 

 

DataValueField="ClientID" />



.CS

 

protected

void Page_Load(object sender, EventArgs e)

 

{

DefaultValues();

}

 

private void DefaultValues()

 

{

 

for (int i = 0; i < 3000; i++)

 

{

RadComboBox1.Items.Add(

new RadComboBoxItem(i.ToString(), i.ToString()));

 

dd.Items.Add(

new ListItem(i.ToString(), i.ToString()));

 

}

}


Thanks in advance,
-Toi

1 Answer, 1 is accepted

Sort by
0
Shark75
Top achievements
Rank 2
answered on 04 Mar 2009, 03:23 PM
We've made very heavy use of RadComboBox, but now our drop lists are filling with lots of data they're unusably slow. For example we populate one of our combos with up to 5000 entries from a corporate directory. This take 3 minutes with a Telerik ComboBox. Change the RadComboBox to a DropDownList and performance is 3 seconds.

The problem with DropDownList of course is purely styling which is governed by the OS/browser/theme so DropDownLists look different on different browsers/OSs/themes, which tbh is the only reason I can think of to use the RadComboBox anyway and I don't know if there is anyway to style individual items of a DropDownList.

It looks to me like it's so slow because each item in the combo list is surrounded by a div and has an "uncessary" ID (which as we know in ASP.Net can be VERY big), which is considerably bloating the html and presumably making the browser work much harder to render than a built in html select (which is what the asp DropDownList renders as). I assume this is done like this so that items in the list and the textbox bit of the combo can be styled?

We can't easily move to ASP.NET AJAX version of RadControls and even if we could I've tried them in sample applications and they suffer the same problem. Virtual scrolling and filtering results could be done on the ASP.NET AJAX version, but I'd rather have a fast DropList than a slow and cumbersome virtual scrolling combobox. :-(

Tags
ComboBox
Asked by
toi
Top achievements
Rank 1
Answers by
Shark75
Top achievements
Rank 2
Share this question
or