[CLOSED] Event Handling from window rendered with a .apsx page to the parent page

  1. #1

    [CLOSED] Event Handling from window rendered with a .apsx page to the parent page

    Hi,

    I had a window control with a panel, I am filling the panel with a .aspx
    page, in aspx page i had few button which need to perform some actions in page which holds the window control....

    As these are two different pages, can we handle the event from one to other....

    i.e when i click on the button in the window I want to refresh the grid in the page which holds the window.

    If it is possible plz let me know how to do that

  2. #2

    RE: [CLOSED] Event Handling from window rendered with a .apsx page to the parent page

    Hi,

    Please see the following topic where discussed communication beetwen parent and child(iframe) page
    http://forums.ext.net/showthread.php...7422-16-1.aspx
  3. #3

    RE: [CLOSED] Event Handling from window rendered with a .apsx page to the parent page

    Hi Vladsch,

    I want to close the Window which is in the parent when a button event happend in child window which is having few buttons (Save and Cancel). When we click on cancel i am using the following code which is working fine

    
    <ext:Button ID="btnClose" runat="server"  Text="Close">
         <Listeners>
             <Click Handler="parent.Ext.WindowMgr.getActive().hide()" />
          </Listeners
    </ext:Button>

    But when I click on save button I need some thing need to be done in code bind and depending the business logic I need to close the window if needed.

    [CODE]
    Mark Up

    <ext:Button ID="btnSend" runat="server" Text="Save">
    <AjaxEvents>
    <Click OnEvent="btnSave_Click"></Click>
    </AjaxEvents>
    </ext:Button>

    Code Behind

    protected void btnSave_Click(object sender, AjaxEventArgs e)
    {
    if (fnSendMessage())
    {
    //Close the Window

    }
    }

    private bool fnSendMessage()
    {
    return true;
    }

    [CODE]


    Thanks in advance
  4. #4

    RE: [CLOSED] Event Handling from window rendered with a .apsx page to the parent page

    Hi,

    Just register that script which you use in Cancel button
     if (fnSendMessage())
            {
                 ScriptManager1.AddScript("parent.Ext.WindowMgr.getActive().hide();");
            }
  5. #5

    RE: [CLOSED] Event Handling from window rendered with a .apsx page to the parent page

    Hi Vladsch,

    Thanks for that and I had one more thing, how to refresh the grid in the parent window, when I save a record I am updating the database and I want the saem to be show in the gird automatically



  6. #6

    RE: [CLOSED] Event Handling from window rendered with a .apsx page to the parent page

    Hi,

    If you need initiate the grid's refreshing (grid in parent page) form child page then
    parent.GridPanel1.reload();

Similar Threads

  1. [CLOSED] How to show ext:Window on Parent page in Nested page
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 09, 2012, 2:33 PM
  2. Replies: 1
    Last Post: Feb 03, 2012, 2:36 PM
  3. WakeUp parent page on usercontrol event
    By immanegiuv in forum 1.x Help
    Replies: 1
    Last Post: Dec 02, 2011, 10:36 AM
  4. [CLOSED] Window in a control is visible when page is rendered
    By gokcemutlu in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 15, 2010, 7:05 AM
  5. [CLOSED] Open a Window in a parent page
    By Immobilmente in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 07, 2009, 4:10 AM

Posting Permissions