I have a formview inside my radwindows. After Insert or Cancel is clicked I want the window to close and the parent to refresh.
How do I go about this?
3 Answers, 1 is accepted
0
Georgi Tunev
Telerik team
answered on 07 Mar 2008, 07:37 AM
Hello bslaght,
You can hook to the OnClientClose event of the RadWIndow and use document.location.reload() or document.location.href = document.location.href to reload / refresh the page.
e.g.
<script type="text/javascript">
function OnClientClose(sender,args)
{
//your code here
}
</script>
<telerik:radwindow id="RadWindow1" runat="server" OnClientClose="OnClientClose" />
Hi Georgi,
That answers the refresh part of my question however, I still don't know how to force the window to close when I click insert on cancel on my formview.
I know I will need to hook into my formview itemcommand, but i don't know what to code in there to close my rad window. Please advise.
0
Georgi Tunev
Telerik team
answered on 10 Mar 2008, 02:11 PM
Hello bslaght,
If I understand you correctly, you wish to close the RadWindow after you do some processing on the server from the content page (that is displayed in the RadWindow), am I right?
There you can see how to call Javascript code from the server in several scenarios - this example closely matches your case. You only need to replace the radalert calling function with the one that closes the RadWindow - GetRadWindow().close() (You must have the GetRadWindow() function declared on your content page before that).