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

RadListBox will not Refresh on DataBind

2 Answers 293 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Vanessa
Top achievements
Rank 1
Vanessa asked on 12 Jun 2012, 11:11 PM
Hello,

I am using telerik controls in a DotNetNuke 6 environment.  I have a RadListBox that needs to be refreshed on DataBind, but no matter what I try, it will not work.  The button is located in a RadWindow, and the page cannot postback upon closing of this window.  I've been trying to figure out the solution for hours and I have yet to find one.  Any help is appreciated, my code is below:

// My RadAjaxManager
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdlb_assets" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdlb_assets">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdlb_assets" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7" />

// My RadListBox
<telerik:RadListBox ID="rdlb_assets" 
                                            runat="server" 
                                            AutoPostBack="true"
                                            EnableDragAndDrop="True" 
                                            OnClientDragStart="OnClientDragStart"
                                            OnClientDragging="OnClientDragging" 
                                            OnClientDropping="OnClientDropping" 
                                            OnClientLoad="RadListBoxLoad"
                                            OnClientItemDoubleClicked="doubleClick"
                                            EnableEmbeddedSkins="false"
                                            Skin="PrestoRadSkin" 
                                            AllowAutomaticUpdates="True">
                        </telerik:RadListBox>

// Javascript fired once the button to close the window is clicked
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind"); 

// Code behind for RadAjaxManager1_AjaxRequest
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (e.Argument == "Rebind")
            {
                    rdlb_assets.Items.Clear();
                    rdlb_assets.DataSource = LoadAssets(thisContent);
                    rdlb_assets.DataBind();
            }
        }

Thank you!

Vanessa

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 18 Jun 2012, 07:44 AM
Hi Vanessa,

Is the RadListBox control located on the same page with the button? Can you replicate the problem outside DNN, in a regular web site sample?

Greetings,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Vanessa
Top achievements
Rank 1
answered on 18 Jun 2012, 02:08 PM
Hi Peter,

actually i have figured out the solution, my radlistbox was inside a pageview of the radmultipage.  the radajaxmanager was outside of the pageview.  i added the radajaxmanager inside the pageview with the radlistbox and it worked like a charm.

thank you for responding :)

Vanessa
Tags
Ajax
Asked by
Vanessa
Top achievements
Rank 1
Answers by
Peter
Telerik team
Vanessa
Top achievements
Rank 1
Share this question
or