I have the following RadAjaxManager defined in my page. The problem is once a user enters some text in the RadModalPopup, I want the RadGrid to refresh when the modalpopup closes. It currently is not, any ideas as to why not?
function closeRadWindow() {
$find("<%= RadAjaxManager.ClientID %>").ajaxRequest();
}
</
script
>
</
TELERIK:RADCODEBLOCK
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager"
runat
=
"server"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"RadWindow1"
runat
=
"server"
Modal
=
"true"
Title
=
"Add New Description to Table"
Width
=
"400px"
Height
=
"150"
Behaviors
=
"Close, Move"
OnClientClose
=
"closeRadWindow"
>
<
ContentTemplate
>
<
asp:Label
ID
=
"Description"
runat
=
"server"
Text
=
"New Description: "
></
asp:Label
>
<
asp:TextBox
ID
=
"NewDescriptionTextBox"
runat
=
"server"
Width
=
"300px"
></
asp:TextBox
>
<
asp:Button
ID
=
"AddNewDescriptionButton"
runat
=
"server"
Text
=
"Add"
OnClick
=
"AddNewDescriptionButton_Click"
/><
br
/><
br
/>
<
asp:Button
ID
=
"CancelAddDescriptionButton"
runat
=
"server"
Text
=
"Cancel"
/>
<
asp:Label
ID
=
"messageLabel"
runat
=
"server"
Text
=
"Label"
Visible
=
"false"
></
asp:Label
>
</
ContentTemplate
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
<
telerik:RadAjaxManager
runat
=
"server"
ID
=
"RadAjaxManager"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel"
OnAjaxRequest
=
"RadAjaxManager_AjaxRequest"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"AdminHoldReasonGrid"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"AdminHoldReasonGrid"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxManager"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"AdminHoldReasonGrid"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
THIS IS THE RELEVANT CODE BEHIND
protected void RadAjaxManager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
AdminHoldReasonGrid.MasterTableView.SortExpressions.Clear();
AdminHoldReasonGrid.Rebind();
}