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
100
Ask confirmation before delete
posted

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>

[....]

Parents
No Data
Reply
  • 37874
    posted

    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://es.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.

Children