We are using DataMenuItem in Infragistics.Web.UI.NavigationControls for the menu.
When user click a menu item, the code first checks a condition, if the condition is not satisfied, this selected menu item will not work, and a message will pop up. In my code I will use scriptManager.RegisterStartupScript to popup the message, and I need to cancel the menu click event. How to do the cancelation of the menu item click?
I have the same problem, but even if I do it the same way and get the "Canceled" Message,
the event gets fired anyway.
Seems like it doesnt have any influence no matter if it is canceleled or not.
It does not work for me at all... (using ig.WebDataGrid
In the following code when ClientEvents-ItemClick event is fired in the onClick() function we set_cancel() to true. Is that what you are looking for?
<script type="text/javascript">
function onClick(sender, args) {
args.set_cancel(
true);
alert(
"Canceled");
}
<ig:WebDataMenu ID="WebDataMenu1" ClientEvents-ItemClick="onClick" runat="server">
<Items>
<ig:DataMenuItem Text="Menu1">
</ig:DataMenuItem >
<ig:DataMenuItem Text="menu2"></ig:DataMenuItem >
</Items>
</ig:WebDataMenu >