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
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