Solved

.Net Telerik RadWindow CLose

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

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 39

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now