<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <ig:WebDataGrid ID="UGDest" runat="server" EnableAjax="false" EnableDataViewState="true"> <ClientEvents MouseDown="MenuItem_Click" /> </ig:WebDataGrid> <ig:WebDataMenu ID="ContextMenu" runat="server" IsContextMenu="true"> </ig:WebDataMenu> </ContentTemplate> </asp:UpdatePanel>
here we are using webdatamenu, while click on menu need to disable postback.
Hello Saravanan,
The WebDataMenu has settings for AutoPostBackFlags which are used to tell the control whether to perform an asynchronous postback, full postback, or no postback at all. It is this last one that would meet your requirements. If you modify your markup for the WebDataMenu to the following then it should behave in the way that you want:
<ig:WebDataMenu ID="ContextMenu" runat="server" IsContextMenu="true"> <AutoPostBackFlags ItemClick="Off" /></ig:WebDataMenu>
For more information please see the following documentation:
http://help.infragistics.com/Doc/ASPNET/Current/CLR4.0/?page=Infragistics4.Web.v14.2~Infragistics.Web.UI.NavigationControls.DataMenuAutoPostBackFlags_members.html
http://help.infragistics.com/Doc/ASPNET/Current/CLR4.0/?page=Infragistics4.Web.v14.2~Infragistics.Web.UI.AutoPostBackFlag.html
Please let me know if you have any questions or concerns about using the AutoPostBackFlags.
Saravanan,
In that case what you'll want to do is handle the WebDataMenu's client side ItemClicked event. In this event you can check to see if the menu item that was clicked was one that you want to disable and if so then you can cancel the postback. For more information about the ItemClicked client event, please see the following documentation:
http://help.infragistics.com/Doc/ASPNET/Current/CLR4.0/?page=Infragistics4.Web.v14.2~Infragistics.Web.UI.NavigationControls.DataMenuClientEvents~ItemClick.html
For canceling the postback, the DataMenuItemCancelEventArgs that are passed in the event handler expose a property postBack. By calling eventArgs.set_postBack(0) you can prevent the postback just for the individual item that was clicked at that time.
http://help.infragistics.com/Doc/ASPNET/Current/CLR4.0/?page=WebDataMenu~Infragistics.Web.UI.DataMenuItemCancelEventArgs~postBack.html
That should be fine. Since the controls that trigger the postback are inside an UpdatePanel the default behavior will be to update just the contents of the UpdatePanel when a postback is triggered for that UpdatePanel. Your DataMenuItem click events will only update that UpdatePanel's child controls when you allow them to trigger a postback. Are you seeing something different from this? Could you provide more details on what you are seeing and how you have everything set up?