This is a migrated thread and some comments may be shown as answers.

JScript Question

1 Answer 46 Views
Window
This is a migrated thread and some comments may be shown as answers.
James Greaves
Top achievements
Rank 2
James Greaves asked on 23 Nov 2009, 11:37 AM
Hi,

I am currently using the radwindow as a means of user input.  I have a Java function that will open a different dialog (seperate aspx page) depending on which tab a user is on. 

    function openWin() {  
            var returned = getSelectedTab();  
              
                if (returned == 0) {  
                    
                    var partreturned = getSelectedPartSubTab()  
                    if (partreturned == 0)  
                     {  
                     var oWnd = radopen("./Query/PartRevDialog.aspx", "RadWindow1");  
                     }  
                     else if (partreturned == 1)  
                     {  
                     var oWnd = radopen("./Query/PartCatDialog.aspx", "RadWindow1");                       
                     }  
                  }  
                else if (returned == 1) {  
 
                if (partreturned == 0) {  
                    var oWnd = radopen("./Query/DocTitleDialog.aspx", "RadWindow1");  
                }  
                else if (partreturned == 1) {  
                    var oWnd = radopen("./Query/DocRevDialog.aspx", "RadWindow1");  
                }  
                  }  
              } 


This works perfectly and the correct query dialog is opened.  What i would like to do however is have a function that can onclientclose rebind a specific radgrid.

I can hard code the radgrid (as below:)

 function RefreshGridPartRev() {  
                  var masterTable = $find("<%=RadGridPartRev.ClientID %>").get_masterTableView();  
                  masterTable.rebind();  
              } 

This fires on clientclose of the radwindow and will rebind the grid "RadGridPartRev".  I would like to change this grid depending on which ASPX window the user has been on.  Is there a way to do this or will have to resort to determining which tab the user is on?  


Cheers,

James

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 23 Nov 2009, 01:13 PM
Hi James,

If you close the window from a button within the content page, you can send an argument to the parent page which you can check in the OnClientClose event handler - just like shown in this help article.
Another option is to use get_navigateUrl() in the OnClientClose event handler which will give you the page with which that RadWindow has been opened. Note that because of browser's security, you will be able to get only the page with which that RadWindow has been opened initially. This means that if your users open Dialog1.aspx and then are able to browse to another content page in that RadWindow, you will be able to get only Dialog1.aspx in get_navigateUrl().



All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
James Greaves
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Share this question
or