Solved

.Net Telerik RadWindow CLose

Posted on 2016-10-05
4
22 Views
Last Modified: 2016-10-09
In a RadGrid_ItemCreated sub....

I am assigning this to a hyperlink in the grid itself
DirectCast(dataItem.FindControl("LinkName"), HyperLink).Attributes("onclick") = "return window.radopen('EmployeeContact.aspx?MyLeads=1&ispop=1&IndividualID=" & IndividualID & "" & "','ViewContact');"

Open in new window

This opens a RadWindow and what I need is On that popped up RadWindow close ....

To refresh the parent page
0
Comment
Question by:lrbrister
  • 2
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 41830550
<script type="text/javascript">

    function OnChildWindowClosed(sender, eventArgs) {
        document.location.reload(); // there may be a cleaner way to do the refresh
    }

</script>

Open in new window


Attach that to the onclientclose of your radwindow.

Note that it's also possible to have a hidden button and invoke a click if you don't want to reload the page and do an ajax call instead.

Full reference:
http://docs.telerik.com/devtools/aspnet-ajax/controls/window/client-side-programming/events/onclientclose
0
 

Author Comment

by:lrbrister
ID: 41831785
Kyle...
The example uses the html control RadWindow to control the opening

I am using server side code.
The window that opens is a vb.net aspx page with a MasterPage wrapper.

I found this code.... but where do I place that (or something similar) since it is in a MasterPage?
The MasterPage itself cannot be changed
<script>
    window.onunload = refreshParent;
    function refreshParent() {
        window.opener.location.reload();
    }
</script>
0
 
LVL 40

Assisted Solution

by:Kyle Abrahams
Kyle Abrahams earned 500 total points
ID: 41832201
If the popup window is being called from the master page then that code needs to be in the master page itself.  

I guess you can always register a startup script on the page_load of a content page, but that seems hacky and rather counter-intuitive.

Or is the master page referencing some external javascript  (EG: in the header a link to Scripts/Script.js or something)?  If you can modify the javascript that the page references, you wouldn't be modifying the master page per se.
0
 

Author Closing Comment

by:lrbrister
ID: 41836317
Great answer
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question