RadListBox will not Refresh on DataBind

3 posts, 0 answers
  1. Vanessa
    Vanessa avatar
    3 posts
    Member since:
    Jun 2012

    Posted 12 Jun 2012 Link to this post

    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. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 18 Jun 2012 Link to this post

    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.
  3. Vanessa
    Vanessa avatar
    3 posts
    Member since:
    Jun 2012

    Posted 18 Jun 2012 Link to this post

    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
Back to Top