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

[Solved] RadComboBox items are gone upon Ajax callback

5 Answers 201 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Chris Shi
Top achievements
Rank 1
Chris Shi asked on 27 May 2008, 07:07 PM
Hi,
I am updating the content of one combo box with another combo box through AjaxManager.

    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <telerik:RadAjaxManager ID="AjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ddlProductGroup">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ddlProductCategory"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="ddlCategory"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

In the code above ddlProductGroup and ddlProductCategory are RadComboBox and ddlCategory is a standard asp:dropdownlist.  Upon callback, I bind the same datasource object to ddlProductCategory and ddlCategory; however only ddlCategory is populated with data and ddlProductCategory has no data. 

Here is the code for binding controls:
        private void ddlProductGroup_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            this.ProductCategories = _presenter.EligibleProductCategories();
            this.Categories = _presenter.EligibleProductCategories();
        }

When I replace the Ajax callback with a standard postback, the problem goes away.  Does anyone have a solution for this? 

Thanks,
Chris

5 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 28 May 2008, 11:43 AM
Hi Chris Shi,

I tried to reproduce the problem, but to no avail.
Please find attached my test page. Download it and give it a try.


Greetings,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Chris Shi
Top achievements
Rank 1
answered on 28 May 2008, 04:10 PM
Hi Veskoni,
Thanks for your reply. I tried out your code, and it's having the same problem. Basically, once i click on the first dropdown, the second dropdown is only populated with one item -- "RadComboBoxItem2 child 1".  Another issue I have with Telerik is the intellisense does not show up in my html view. I'm using Telerik.Web.UI.dll (version 2008.1.415.35) and visual studio 2008 pro. Thanks.

0
Michael Prosper
Top achievements
Rank 1
answered on 29 May 2008, 12:32 AM
Hi Chris,

Any luck with this problem?  I'm experiencing the same thing with the RadAjaxManager - Multiple databound RadComboBoxes working fine if I do a regular postback or enclosed in a RadAjaxPanel, but as soon as I try to use the Manager, the databound items disappear when the panel refreshes.

I'll submit a support request if there's no resolution here, but I thought I might ping you first.

0
Chris Shi
Top achievements
Rank 1
answered on 29 May 2008, 12:40 AM
Michael, I have not found a solution; however the following link points to a demo that provides a workaround for what i'm trying to do:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/ComboBox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx

The demo shows how to populate combo boxes upon selecting items in another combo box in a call-back fashion.

chris
0
Veselin Vasilev
Telerik team
answered on 30 May 2008, 12:03 PM
Hi guys,

I have created a small video that shows that this scenario works fine on my side.

Please download it and give it a try. What is different in your case?

Kind regards,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
Chris Shi
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Chris Shi
Top achievements
Rank 1
Michael Prosper
Top achievements
Rank 1
Share this question
or