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

[Solved] RadComboBox Performs full-page PostBack inside asp:UpdatePanel

2 Answers 276 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jordan Harrison
Top achievements
Rank 1
Jordan Harrison asked on 21 Jan 2008, 05:19 PM
Hi,

Sorry if this has been discussed, I couldn't find much on the forum.

I have a RadComboBox inside an asp:UpdatePanel. The ComboBox performs an OnSelectedIndexChanged Postback which loads soome detail about the selected item onto the page. However, when I select an Item it performs a full page PostBack, as if the UpdatePanel weren't there.

EXAMPLE:
<asp:UpdatePanel ID="PersonDetailPanel" runat="server">
    <ContentTemplate>
        <telerik:RadComboBox ID="PersonNameCombo" runat="server"
            OnItemsRequested="PersonNameCombo_ItemsRequested" EnableLoadOnDemand="True"
            OnSelectedIndexChanged="PersonNameCombo_SelectedIndexChanged"
            AutoPostBack="true" Width="350px" />
        <asp:Label ID="AgeLabel" runat="server" /><br/>
        <asp:Label ID="AddressLabel" runat="server" />
    </ContentTemplate>
</asp:UpdatePanel>

Is there a solution to this?

Cheers
Jordan

2 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 22 Jan 2008, 01:17 PM
Hello Jordan,

We tried to recreate the problem based on your code, but there wasn't a postback.  Could you please examine the attached test project and compare it to your version? If you find it convenient, maybe you could send us your version to check it here locally as well. Note, that you need to open a support ticket to be able to attach files.



All the best,
Simeon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jordan Harrison
Top achievements
Rank 1
answered on 23 Jan 2008, 03:15 PM
AARRGGHH!! Simeon, I need a drink after all the time spent on this one.

So, thanks yes, that project works, but the difference, which I forgot to mention (wish I had, it's a big one) is my ComboBoxes are within a user control in SharePoint 2007. Big problem!!! Turns out SharePoint has a couple of issues with UpdatePanels working correctly, so you'll be happy to hear this bug is nothing to do with the RadComboBox.

If using an UpdatePanel inside SharePoint 2007 you need to include this little javascript snippet somewhere on the page, otherwise your postbacks completely bypass the UpdatePanel:

<script type='text/javascript'>
<!--
    _spOriginalFormAction = document.forms[0].action;
    _spSuppressFormOnSubmitWrapper = true;
//-->
</script>

Finally - my RadComboBox postback is working correctly inside the UpdatePanel!
Tags
ComboBox
Asked by
Jordan Harrison
Top achievements
Rank 1
Answers by
Simon
Telerik team
Jordan Harrison
Top achievements
Rank 1
Share this question
or