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
Like he said. the WARP panel and WDW do not work with each other.
Replace your warp panel with the ajax update panel.
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() %>");
}
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.
Hi Ben,
You mentioned that "WDW doesn't play well with Infragistics WARPs". That is correct, but combination of UpdatePanel with WARP is even worse and it is not supported. These 2 controls can work on same page side by side, but not nested in each other. They have incompatible async-call-back managers. If you use AJAX controls, then you should replace all WARPs by UpdatePanels.