Solved

.Net Telerik RadWindow CLose

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

839 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