Hi,
I am using WebDialogWindow control of NetAdvantage version 11.1. By default i have set its windowstate to hidden. I want to change it's state to "Normal" on the Itemclick event of "ContextMenu" control. "This contextmenu is inside the AJAX <UpdatePanel> control and i am also using <triggers> on ItemClick for auto-update. Now the problem is on click of Context Menu item WebDialog window is not appearing.
Can anyone help me in this issue?
Thanks,
Mits
Hello Mits,
it should be something like this:
<head runat="server"> <title></title> <script type="text/javascript"> function ItemClick() { var dw = $find('<%=WebDialogWindow1.ClientID%>'); dw.show(); } </script> </head> <body> <form id="form1" runat="server"> <ig:WebScriptManager ID="WebScriptManager1" runat="server"> </ig:WebScriptManager> <ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="300px" Width="400px" WindowState="Hidden"> </ig:WebDialogWindow> <asp:UpdatePanel ID="Updatepanel1" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="WebDataMenu1" EventName="ItemClick" /> </Triggers> <ContentTemplate> <ig:WebDataMenu ID="WebDataMenu1" runat="server"> <ClientEvents ItemClick="ItemClick" /> <AutoPostBackFlags ItemClick="On" /> <Items> <ig:DataMenuItem Key="item1" Value="item1" Text="item1"> </ig:DataMenuItem> </Items> </ig:WebDataMenu> </ContentTemplate> </asp:UpdatePanel> </form> </body> </html>
<head runat="server">
<title></title>
<script type="text/javascript">
function ItemClick() {
var dw = $find('<%=WebDialogWindow1.ClientID%>');
dw.show();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ig:WebScriptManager ID="WebScriptManager1" runat="server">
</ig:WebScriptManager>
<ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="300px" Width="400px"
WindowState="Hidden">
</ig:WebDialogWindow>
<asp:UpdatePanel ID="Updatepanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="WebDataMenu1" EventName="ItemClick" />
</Triggers>
<ContentTemplate>
<ig:WebDataMenu ID="WebDataMenu1" runat="server">
<ClientEvents ItemClick="ItemClick" />
<AutoPostBackFlags ItemClick="On" />
<Items>
<ig:DataMenuItem Key="item1" Value="item1" Text="item1">
</ig:DataMenuItem>
</Items>
</ig:WebDataMenu>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
Hi Hristo,
Thanks for the reply. Your suggestion is working fine however i am now getting a new problem. I have one DropDown and Button server control inside the WebDialogWindow. On click of button i am writing a server side code to update the DB with the dropdown value. On client click of button i am also calling the client side method to close the WebDialogWindow. Now the problem is when i click on button i am getting the attached error. Please guide me to fix this bug or is there any other way with that we can perform server side action on button as well as close the WebDialog window.
Hi Mits,
were you able to resolve your issue ?
Thanks
Thanks for the reply. I will try the suggestions mentioned in the forum post and will get back to you if it won;t works.
Hi Mits,I couldn't reproduce this. Tell us what is your version and paste your markup. I research this error:
Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method
and found the following forum post: http://forums.asp.net/p/1074142/1739653.aspx