I'm having a combobox (with load on demand enabled) and a ajax panel on my page. When the ajax panel is loading, the combobox is unable to retrieve the items. How can I solve this, so the user can open the combobox while the panel is loading?
You can use the following code to reproduce the problem. Just click the reload button, and open the combobox immediately afther that.
You can use the following code to reproduce the problem. Just click the reload button, and open the combobox immediately afther that.
<telerik:RadScriptBlock runat="server" ID="scriptBlock"> |
<script type="text/javascript"> |
function reload() |
{ |
$find("<%=pnl.ClientID %>").ajaxRequest(); |
} |
</script> |
</telerik:RadScriptBlock> |
<script runat="server"> |
Protected Sub pnlAjaxRequest(ByVal sender As Object, ByVal e As EventArgs) |
Threading.Thread.Sleep(1000) |
End Sub |
Protected Sub cmbTestItemsRequested(ByVal sender As Object, ByVal e As EventArgs) |
Dim cmb = DirectCast(sender, RadComboBox) |
cmb.DataSource = New String() {"John Doe", "Jane Doe", "Baby Doe"} |
cmb.DataBind() |
End Sub |
</script> |
<asp:Button runat="server" ID="clickme" OnClientClick="reload(); return false;" Text="Reload" /> |
<telerik:RadComboBox runat="server" ID="cmbTest" OnItemsRequested="cmbTestItemsRequested" EnableLoadOnDemand="true"> |
</telerik:RadComboBox> |
<telerik:RadAjaxLoadingPanel runat="server" ID="loadingPanel"></telerik:RadAjaxLoadingPanel> |
<telerik:RadAjaxPanel ID="pnl" runat="server" LoadingPanelID="loadingPanel" OnAjaxRequest="pnlAjaxRequest"> |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean fermentum auctor lectus. Aliquam erat volutpat. Integer in tellus. Morbi vitae pede quis pede rutrum feugiat. Vestibulum et dui vel mauris placerat porta. In hac habitasse platea dictumst. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus blandit. Maecenas hendrerit orci non turpis eleifend venenatis. Duis vitae orci eget turpis tristique venenatis. Aliquam vitae libero vel libero pharetra bibendum. Mauris hendrerit hendrerit mauris. Cras fringilla dolor in nibh. Duis gravida rhoncus tellus. Praesent eget orci. Duis ultrices leo non justo. Quisque egestas. |
</telerik:RadAjaxPanel> |