couple question on C1Window

Posted by: kaushalparik27 on 10 September 2017, 11:27 am EST

  • Posted 10 September 2017, 11:27 am EST

    i am using C1Window in my asp.net web application.. so having some queries on the same.


    [1] i am using c1window in which i have placed an iframe and src of the iframe is a page.


    - how would i pass some data from the parent page (where the c1window is declared) to the page set as src of the iframe. ultimately, you can say i want to fill some data from parent page to the popup page.


    [2] is there any way/method to close the c1window popup by code? say by cliking a button, i save the data in db and close the popup?


    [3] is there any way to refresh the parent page [where the c1window is declared] after closing the c1window popup.


     

  • Replied 10 September 2017, 11:27 am EST

    anybody from support ?

  • Replied 10 September 2017, 11:27 am EST

     1) Did you know you can just use ContentURL instead of putting an iframe inside your C1Window? The only way to pass data would be to change the querystring in the ContentURL. Perhaps that would load data based on the ID as a param in the querystring.  I would also recommend not using a seperate page in an iframe if you are sending alot of data. Instead I would add controls inside the Content Template of the C1Window.

    2) Yes, if it is a server side even then just change ShowOnLoad="false" during your PostBack. You can also call a close() function in JavaScript on the control after you declare it.

    3)  In the iframe page you should be able to call parent.location.reload() in JavaScript

     

  • Replied 10 September 2017, 11:27 am EST

    2) With the WebDialog I set ShowOnLoad=false | true with success, but with the new C1Window I get a javascript error when setting ShowOnLoad=false and then updating the Updatepanel where the C1Window is.


    Any idea why this does not work?


    Thanks


    Bjorn

  • Replied 10 September 2017, 11:27 am EST

    anybody from C1 family ??


    how do i open window from code behind in a button_click ?

  • Replied 10 September 2017, 11:27 am EST

     You could call the window.hide() method to achieve this.

  • Replied 10 September 2017, 11:27 am EST

    window.hide() is a client method ....


    The issue here is to close the window from server code.


    Anyhow, I have figured out a solution for this, in fact two.


    1. Set the ChildrenAsTriggers="false" for the C1Window. This solves the javascipt error.


    2. Calling the window.hide() from servercode using:


    ScriptManager.RegisterStartupScript(this, typeof(Page), "hide", "myWindow.hide();",true);

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels