Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
A "global" WebDialogWindow on a MasterPage
posted

Greetings.  I'm in the process of re-writing a legacy Classic ASP application in ASP.NET and am making heavy use of the Infragistics controls set (they are cool).

I'm using a classic design methodology employing a single Master page for a common site header/navigation/footer and then cycling in content pages.  Nothing big here.

What I'm after is a method to have a WDW on the Master page such that all subsequent content pages can show/manipulate the dialog window based on user input (e.g. field validation errors, or positive feedback on submitting new records).

Oh, and I'm really trying to avoid full page postbacks.  My site already makes heavy use of the Infragistics WARPs to avoid this (e.g. selecting a record from an UWG updates details fields, etc.).

I'm pulling my hair out trying to get simple test cases to work with no avail.  I've tried using the CSOM and other methods with no luck.  Perhaps if I spell out one test case in detail, you can shed some light on it.

 

I've defined a master page and in it I've included a ScriptManager (ID = smMaster) and UpdatePanel (ID = upUserPrompt) (I've read that the WDW doesn't play well with Infragistics WARPs).  In the UpdatePanel's content template, I've placed a WebDialogWindow (ID = wdwUserPrompt).  The WDW also has the following initial conditions set in markup on the master page (InitialLocation="Centered" and WindowState="Hidden").

In a particular content page I have an UtraWebTab.  I've created a tab and inside the tab's content pane are 3 WARPs (ID = warpTable, ID = warpDetails, ID=warpButtons).  Inside warpTable, I have an UWG that, when a row is clicked updates several details fields and sets button visiblity.  Inside warpDetails, I have several <igtxt:WebTextEdit> controls which are set by the UWG and buttons.  Inside warpControls I have several <igtxt:WebImageButton> controls which perform business logic to update an underlying data source used by the UWG.  I would like to display the WDW (set the WindowState to Normal) on the Master page on clicking these buttons.  How can I do this?

In short, I have <igtxt:WebImageButton> inside an <igmisc:WebAsynchronousRefreshPanel> inside an <igtab:Tab> inside an <igtab:UltraWebTab> inside an <asp:Content> content page.  I want that button to manipulate an <ig:WebDialogWindow> which is inside the content template of an <asp:UpdatePanel> that is on a MasterPage with a ScriptManager.

Thoughts?

Thanks in advance!

Ben

Parents
No Data
Reply
  • 100
    posted

    WDW doesnt really play to well with WARPS, but I kinda have a work around to prevent post backs. Only thing is this probably wont work with a "global" WDW as in your case.

    I use javascript to hide and show the WDW. Inside the WDW I use a WARP for server side control handling and to prevent total page post-backs.

    I have a very large page so for one of my controls, I use a WDW with a form to edit an existing control on the page. So my "Edit" button runs the below javascript. The WDW pops up.

     -------------------------

     functionUltraWebGrid1_ClickCellButtonHandler(gridName, cellId){

    ShowPolDialog("<%= GetClientIDofDialog() %>");

    }

     

    function ShowPolDialog(ctrl) {
    var win = $find(ctrl);

    win.show();

    }

     -------------------------

    The user fills out the form with text and hits a ASP Button 'Confirm.' The 'Confirm' button is inside the warp (in the WDW) so it does the server side events and I also have a client-side event to hide the WDW. Because the WDW is on the same page as my other controls/WARP panels, I have the 'Confirm' button linked to them so they refresh as well.

    Only problems is that it gets tricky if you want to do some validation as typically the client-side hides the window before it hits the server-side events so informing the user can get interesting. You could always do client-side validation before hiding the window and use AJAX if you need to get a server variable or value from a database.

Children