HI,
I need to ask a confirmation when user clicks a specific menu item ("delete").
How can I accomplish this?
I am using Infragistics35.Web.v9.2, Version=9.2.20092.2056
Thanks in advance
Marco Morreale
<ig1:WebDataMenu ID="WebDataMenu1" runat="server" GroupSettings-ExpandDirection="Down" GroupSettings-Orientation="Horizontal" onitemclick="WebDataMenu1_ItemClick" > <groupsettings animationduration="100" orientation="Horizontal" /> <Items> <ig1:DataMenuItem Text="Funzioni" Key="functions" > <Items> <ig1:DataMenuItem Text="Rilascia" Key="release"> <GroupSettings AnimationDuration="100" /> </ig1:DataMenuItem> <ig1:DataMenuItem Text="Riapri" Key="reopen"> <GroupSettings AnimationDuration="100" /> </ig1:DataMenuItem> <ig1:DataMenuItem Text="Elimina" Key="delete" > <GroupSettings AnimationDuration="100" /> </ig1:DataMenuItem>
[....]
Hello morreale,
If you need any further assistance with the matter, please let me know.
Hi morreale,
You could handle the ItemClick client-side event of the menu using code similar to the following:
function WebDataMenu1_ItemClick(sender, args) { if (args.getItem().get_text() == "delete") { var conf = confirm("delete?"); if (conf == true) {alert("deleted");} }}
Please note that your NetAdvantage version is outdated and is no longer supported - http://ko.infragistics.com/help/product-lifecycle/. I suggest that you upgrade the controls you are using.
If you have any other questions, please do not hesitate to ask.