Click here to Skip to main content

ASP.NET

   

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
QuestionHow to Hide telerik:GridTemplateColumn on the ClientSide PinmemberVuyiswa Maseko11:16 22 Feb '12  
AnswerRe: How to Hide telerik:GridTemplateColumn on the ClientSide Pinmembermark merrens12:03 22 Feb '12  
AnswerRe: How to Hide telerik:GridTemplateColumn on the ClientSide Pinmemberwizardzz10:42 23 Feb '12  
GeneralRe: How to Hide telerik:GridTemplateColumn on the ClientSide PinmemberVuyiswa Maseko18:04 23 Feb '12  
GeneralRe: How to Hide telerik:GridTemplateColumn on the ClientSide PinmemberVasudevan Deepak Kumar5:02 28 Feb '12  
GeneralRe: How to Hide telerik:GridTemplateColumn on the ClientSide PinmemberVuyiswa Maseko5:45 28 Feb '12  
QuestionClose the Popup After Update PinmemberVuyiswa Maseko11:02 22 Feb '12  
Good Morning All
 
I am Opening a Page as a Popup i am using Telerik WIndow which has similar functionality when opening a Popup like this
 
 function OpenPopUp(val_real, vis) {
            var myWidth = 0, myHeight = 0;
            if (typeof (window.innerWidth) == 'number') {
                //Non-IE
                myWidth = window.innerWidth;
                myHeight = window.innerHeight;
            } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
                //IE 6+ in 'standards compliant mode'
                myWidth = document.documentElement.clientWidth;
                myHeight = document.documentElement.clientHeight;
            } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
                //IE 4 compatible
                myWidth = document.body.clientWidth;
                myHeight = document.body.clientHeight;
            }
 
            myWidth = myWidth / 2 - 150;
            myHeight = myHeight / 2 - 50;
            window.open('MyPage.aspx?Val=' + val_read, 'width=700,height=160,top=' + myHeight + ',left=' + myWidth)
            return false;
 
        }

 
this "myPage.aspx" page has a button that person some updates to the Database on the server side. This is opened as a popup and there is a grid below , so what i want to do after the Update to the Database has happened , i want to refresh the Grid, i have this code

 //This code is used to provide a reference to the radwindow "wrapper"
        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;
        }
 
        function CloseOnReload() {
            //alert("Dialog is about to close itself");
            GetRadWindow().close();
            RefreshParentPage();
        }
 
        function RefreshParentPage() {
            //alert("Dialog is about to reload parent page");
            GetRadWindow().BrowserWindow.location.reload();
        }
 
        function RedirectParentPage(newUrl) {
            alert("Dialog is about to redirect parent page to " + newUrl);
            GetRadWindow().BrowserWindow.document.location.href = newUrl;
        }
 
        function CallFunctionOnParentPage(fnName) {
            alert("Calling the function " + fnName + " defined on the parent page");
            var oWindow = GetRadWindow();
            if (oWindow.BrowserWindow[fnName] && typeof (oWindow.BrowserWindow[fnName]) == "function") {
                oWindow.BrowserWindow[fnName](oWindow);
            }
        }
 
        function RefreshParentPageWithoutWarning() { 
            GetRadWindow().BrowserWindow.document.forms[0].submit();
        } 
 
and on the server side i have this
 
                    Response.Write("<Script>return RefreshParentPageWithoutWarning();</script>") 
or
 
SavetoDB(Values)
 
 ScriptManager.RegisterStartupScript(Page, Me.GetType(), "", "RefreshParentPageWithoutWarning()", True) 
 
My problem here is that it Refresh the page before it does a Database Update, and if it refreshes the page , the Database update ends up not being done.
 
Thanks
Vuyiswa Maseko,
 
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
 
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com

AnswerRe: Close the Popup After Update Pinmembermark merrens12:02 22 Feb '12  
GeneralRe: Close the Popup After Update PinmemberVuyiswa Maseko19:53 22 Feb '12  
QuestionError in deploying Asp.net web application with crystal report version 13 Pinmemberakosidandan4:14 22 Feb '12  
AnswerRe: Error in deploying Asp.net web application with crystal report version 13 Pinmemberamargujrathi200618:26 23 Feb '12  
QuestionASP.Net timeout Pinmemberberba1:39 22 Feb '12  
AnswerRe: ASP.Net timeout Pinmembermark merrens12:07 22 Feb '12  
AnswerRe: ASP.Net timeout Pinmvpthatraja19:54 22 Feb '12  
QuestionUpdatePanel inside TemplateField PinmemberHanzaplast1:22 22 Feb '12  
QuestionDatagrid - how to display an Image PinmemberBazzer7470:34 22 Feb '12  
Questioncreate subdomain in the asp.net Pinmemberapadana_198923:07 21 Feb '12  
AnswerRe: create subdomain in the asp.net Pinmembermark merrens12:08 22 Feb '12  
QuestionAutomatically Printing Crystal Reports in ASP.NET Pinmembersaidfathi21:22 21 Feb '12  
QuestionHow to remove CC and To in Outlook using Outlook Add in Template in .net Pinmemberpalanirajan20:50 21 Feb '12  
Questionsmtp: help how make emails deliver to inbox not junk box Pinmemberawedaonline0:43 21 Feb '12  
AnswerRe: smtp: help how make emails deliver to inbox not junk box PinmvpRichard MacCutchan1:32 21 Feb '12  
Questionhelp how make emails deliver to inbox not junk box Pinmemberawedaonline0:42 21 Feb '12  
AnswerRe: help how make emails deliver to inbox not junk box PinmvpRichard MacCutchan1:31 21 Feb '12  
QuestionIIS URL Pinmemberzead21:46 20 Feb '12  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Beta | 2.5.120517.1 | Last Updated 22 May 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid