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

[Solved] radwindow not closing

1 Answer 127 Views
Window
This is a migrated thread and some comments may be shown as answers.
jim kerry
Top achievements
Rank 1
jim kerry asked on 08 Feb 2010, 03:21 PM
 

Protected Sub BtnInsert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnInsert.Click
following is my code and the radwindow is not closing while website hosted in IIS
by directly running from visual studio its working

''''''' client side
   function CloseAndRebind(args) {
                GetRadWindow().Close();
                GetRadWindow().BrowserWindow.refreshGrid(args);
            }

            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 as well)

                return oWindow;
            }



''''''server side      
Try
 
                If Not ViewState("FileName") Is Nothing Then
                    sSql = " insert into Images(Name, Description, ImageName) values('" & DoInsertable(txbName.Text.Trim) & "','" & DoInsertable(txbDescription.Text.Trim) & "','" & DoInsertable(ViewState("FileName")) & "')"
                    ExecuteQuery(sSql)
                    ViewState("FileName") = Nothing
                    ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind('navigateToInserted');", True) ''check here
                Else
                    ScriptManager.RegisterStartupScript(Me, Me.GetType(), "newkey", "<script>alert('No File Exists');</script>", False)
                End If
          

        Catch ex As Exception
            ScriptManager.RegisterStartupScript(Me, Me.GetType(), "mykey", "<script>alert('" & Err.Description & "');</script>", False)
        End Try
    End Sub

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 09 Feb 2010, 06:44 AM
Hello jim,

I would suggest to put a standard alert() in your CloseAndRebind() function and check if it is called at all. The code that you posted seems OK and should not be the reason for the problem.


Sincerely yours,
Georgi Tunev
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Window
Asked by
jim kerry
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or