Solved

.Net Telerik RadWindow CLose

Posted on 2016-10-05
4
30 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to repeat the data 4 30
How to downgrade visual studio 2015 enterprise to professional 6 41
"The resource cannot be found" 1 22
Return array 3 19
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

679 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