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

callback function through rad window

3 Answers 215 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 22 May 2008, 10:05 AM

Hi,

I have one default page (default.aspx) inside that i have one user control containing rad grid.
On click of the link button (which is one column in grid) i am opening the rad window.
On click of update button (which is inside rad window ) i want to close the rad window and refresh the calling page (default.aspx).

It closes the rad window but could not refresh the calling Page(Default.aspx).
Please assist.

Code in rad window.
<script type="text/javascript">
   function CloseAndbind(status) 
        { 
                   
            var obj = GetRadWindow();
            obj.CallBack(status);
        } 
         
        function GetRadWindow() 
        { 
            var oWindow = null; 
            if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog 
              else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well) 
            return oWindow; 
        } 
    </script>

code in calling page (default.aspx)

<script type="text/javascript">

        function CallBackFunction(radWindow,returnValue1)
        {            
            callButtonClick();          
        }
        function callButtonClick()
        {
         var _btn = document.getElementById('<%= Button1.ClientID%>');     
   _btn.click(); 
   
        }
</script>

        
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Behaviors="Close,Move,Reload"
          Modal="true" Animation="None" ClientCallBackFunction="CallBackFunction" ShowContentDuringLoad="true" VisibleStatusbar="true"
               Skin="WebBlue">
           <Windows>
                <telerik:RadWindow Width="910px" Height="640px" ClientCallBackFunction="CallBackFunction"
                 Runat="server" Id="Radwindow1"
                            VisibleStatusbar="false" >              
                </telerik:RadWindow>
           </Windows> 
</telerik:RadWindowManager>

3 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 22 May 2008, 10:07 AM
Hello Rahul,

I think that the online resources pointed below can become a starting point for your custom implementation:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Controls/Examples/Integration/GridAndWindow/DefaultCS.aspx?product=grid
http://www.telerik.com/support/kb/article/b454K-gmb-b454T-cba-b454c-cba.aspx

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rahul Khinvasara
Top achievements
Rank 1
answered on 22 May 2008, 11:01 AM
hi,
Its not working..
May be because my grid is in user control..
Please give me solution..
0
Rahul Khinvasara
Top achievements
Rank 1
answered on 22 May 2008, 11:45 AM
Also I am not getting from where to call refreshGrid(arg)
function?
Tags
General Discussions
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Rahul Khinvasara
Top achievements
Rank 1
Share this question
or