I have a very simple example that I am trying to make work where I have a WebDialogWindow inside of a WARP. I want to have a button outside of the panel that causes a refresh to bring up the WebDialogWindow. I have now tried the button both inside and outside and neither works. It seems to only work when I use a full postback. Can anyone tell me how to do this? How do I make this work with the button outside of the WARP?
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server">
<asp:Button Text="Show Window" ID="showWindow" runat="server" onclick="showWindow_Click" />
StyleSetName="Office2007Blue" Width="400px" WindowState="Normal" Visible="false">
</ig:WebDialogWindow>
</igmisc:WebAsyncRefreshPanel>
Take a look at this help article:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/WebAsyncRefreshPanel_Trigger_a_Smart_Callback_in_WebAsyncRefreshPanel.html
You want to set the TriggerControlIDs of the WARP to include the button that is outside of the panel.
Well, I tried it, but it doesn't work... And I don't know where is my mistake.
The aspx code is:
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Height="220px" Width="280px" LinkedRefreshControlID="WebAsyncRefreshPanel1" TriggerControlIDs="WebImageButton1">
<cc4:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="300px" Width="400px" Modal="True" WindowState="Hidden">
<ContentPane>
<Template>
</Template>
</ContentPane>
<asp:Button ID="showDialog2" runat="server" Text="Show" onclick="showDialog2_Click"/>
And my button code in the .cs file is:
}
Where is my mistake?
Yes, I corrected the trigger id to be my showDialog2 button, but nothing happens... When I press the button, the refresh shows for a fraction of time, but the webdialogwindow does not show...
It may have something to do with this:
http://forums.infragistics.com/forums/p/9510/37141.aspx#37141
Use an UpdatePanel instead.
Yes, that's what I did... I used an update panel, and everything works great. Why is that? It should work...
The WARP uses different AJAX from Microsoft. It was developed for CLR 1.x and is incompatible with MS AJAX and our Aikido controls. If you are doing any AJAX development, we recommend the use of the Update Panel over the WARP unless absolutely required, for example clr 1.x.
Ok. I didn't know that!
So, if I got it right, I should use UpdatePanel, if i use AJAX, and not the warp. The warp, I should use it alone, and without any ajax? Is that correct?
You should use the UpdatePanel for almost every case. You only want to use the WARP when you are on CLR 1.x.