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

Drop Down List Data Bind

1 Answer 99 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Germán
Top achievements
Rank 1
Germán asked on 03 Apr 2014, 01:04 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 04 Apr 2014, 12:53 PM
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.
Tags
DropDownList
Asked by
Germán
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or