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

[Solved] RadCombo - Slow behaviour.

1 Answer 153 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
scott
Top achievements
Rank 1
scott asked on 21 Apr 2009, 03:42 AM

We have an Asp.Net 3.5 application that is set up using a master page with user controls being added to it as the content. Page requests come from an Asp.net 1.1 application that renders the reponse into an iframe within the 1.1 application. Essentially a 1.1 app displaying 3.5 pages within it. One of these pages has a series of  RadComboBoxs in it.  One combo box has about 370 items in it when fully populated – we retrieve the items on demand using GetRequestedItems.

 

Ascx page

<telerik:RadComboBox ID="cmbProductFamily" runat="server" AutoPostBack="True"

                    CollapseAnimation-Duration="1" CollapseDelay="0"

                    EnableLoadOnDemand="True" ExpandDelay="0"

                    ItemRequestTimeout="1000" MaxHeight="400px"

                    onitemsrequested="cmbProductFamily_ItemsRequested"

                    OnSelectedIndexChanged="cmbProductFamily_SelectedIndexChanged"

                    ShowMoreResultsBox="True" Skin="Outlook"

                     Visible="False" Width="250px">

                    <ExpandAnimation Duration="0" />

                    <CollapseAnimation Duration="0" />

                </telerik:RadComboBox>

 

 

Code behind

protected void cmbProductFamily_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

        {

            try

            {

                cmbProductFamily.Items.Clear();

                tbl_ProductVersion[] Prods = GetProductFamilyByEnteredText(e.Text);

                int itemsPerRequest = 50;

                int itemOffset = e.NumberOfItems;

                int endOffset = itemOffset + itemsPerRequest;

                if (endOffset > Prods.Length)

                {

                    endOffset = Prods.Length;

                }

                for (int i = itemOffset; i < endOffset; i++)

                {

                    RadComboBoxItem item = new RadComboBoxItem(Prods[i].UpgradeFamily, Prods[i].lopfamid.ToString());

                    item.ToolTip = Prods[i].UpgradeFamily;

                    cmbProductFamily.Items.Add(item);

                }

                if (Prods.Length > 0)

                {

e.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), Prods.Length.ToString());

                }

                else

                {

                    e.Message = "No matches";

                }

            }

            catch

            {

                e.Message = "No matches";

            }

        }

 

We can run the app on its own (a 3.5 app) and the radcombobox behaves nicely. However, when the page is rendered through the iframe in the asp.net 1.1 app it flickers badly when there is more that about 30 items in the list – you can see the hour glass flickering. At this point it will be slow to respond to selections , scrolling or adding more items using the ShowMoreResultsBox click. But like I say this does not happen when running stand alone in the 3.5 application context – everything works nicely there. I have tried various other settings like enableItemCaching, ShowWhileLoading = false. I have also databound the radcombo to the results set from the query (static items as opposed to load on demand) and still it behaves poorly in the 1.1 iframe context. I also tried just using a standard updatepanel around the control but to no avail.

 

Any ideas on what may be hindering the performance would be appreciated.

 

I am using version RadControls_for_ASP.NET_AJAX_2009_1_311_trial.exe.

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 23 Apr 2009, 12:12 PM
Hello scott,

Veselin Vasilev
Tags
ComboBox
Asked by
scott
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or