Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.Net Telerik RadWindow CLose

Posted on 2016-10-05
4
Medium Priority
?
49 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 2000 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 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