Drop Down List Data Bind

2 posts, 1 answers
  1. Germán
    Germán avatar
    6 posts
    Member since:
    Jan 2014

    Posted 03 Apr 2014 Link to this post

    Hi,

    I have a drop down list within a RadAjaxPanel that will not databind unless the databinding event occurs on the page load event, this control as well as the other control that needs to trigger the databinding event are within two different RadAjaxUpdatePanels:

    Drop down list with its update panel:
    <telerik:RadAjaxLoadingPanel ID="StatisticsLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel ID="StatisticsPanel" runat="server" LoadingPanelID="StatisticsLoadingPanel">
    <table>
    <tr>
    <td style="width: 100px">Product Type*
    </td>
    <td style="width: 150px">
    <telerik:RadDropDownList ID="ProductTypeRadDropDownList" runat="server" DefaultMessage="Select Product Type"
    OnItemSelected="ProductTypeRadDropDownList_ItemSelected" AutoPostBack="true">
    </telerik:RadDropDownList>

    </td>
    **
    Control within its update panel that does the databinding:

    <telerik:RadAjaxLoadingPanel ID="ComponentLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel ID="ComponentRadAjaxPanel" runat="server" LoadingPanelID="ComponentLoadingPanel">
    <table>
    <tr>
    <td style="width: 100px">Part Number*
    </td>
    <td style="width: 150px">
    <telerik:RadAutoCompleteBox ID="ComponentNumberRadAutoCompleteBox" runat="server"
    TextSettings-SelectionMode="Single" OnEntryAdded="ComponentNumberRadAutoCompleteBox_EntryAdded" MinFilterLength="2">
    <WebServiceSettings Path="FeedbackForm.aspx" Method="LookupItem" />
    </telerik:RadAutoCompleteBox>

    </td>

    This is the method on the code behind that does the actual work:

    ComponentNumberRadAutoCompleteBox_EntryAdded(object sender, Auto...)
    {
    ProductTypeRadDropDownList.DataSource = DataTable A;
    ProductTypeRadDropDownList.DataBind();
    }

    I also have on the form the RadAjaxScriptManager so if the 1st panel triggers the update the second panel is updated:

    <telerik:RadAjaxLoadingPanel ID="DefaultLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server" DefaultLoadingPanelID="DefaultLoadingPanel">
    <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="ComponentRadAjaxPanel">
    <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="StatisticsPanel" />
    </UpdatedControls>
    </telerik:AjaxSetting>
    </AjaxSettings>
    </telerik:RadAjaxManager>

    Any ideas as to why this is not working?

    Thanks,
    Germán
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Apr 2014 in reply to Germán Link to this post

    Hi Olivares,

    Please do the following modifications in your code which works as expected for me.

    ASPX:
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server" DefaultLoadingPanelID="DefaultLoadingPanel">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ComponentNumberRadAutoCompleteBox">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ProductTypeRadDropDownList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top