We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Web Menus - prevent postbacks on click

Everytime the user clicks on a menu item, both the root menus and the individual menu items, there is a post back and the page reloads. This happens even if there is a clientside call being made. How do i prevent this behavior? I tried adding Dummy clientside calls but that didn't work. Note that our menu is in a user control. Here is some of the html:

CollapseTransition="Fade" StaticPanelCSSClass="menuRootPanel" DynamicPanelCSSClass="menuPanel"
CustomCSS="Css/LonghornMenu.css" ShadowColor="Gray" useframes="True" width="100%" borderstyle="None" height="25px" scrollingenabled="True" ClientSideOnItemSelect="Dummy()">



TextCellCSSClass="SubItemText" TextContainerCSSClass="SubItemText" />
TextCellCSSClass="SubItemText" TextContainerCSSClass="SubItemText" />
TextContainerCSSClass="SubItemText" />


TextContainerCSSClass="RootItemText" />
TextContainerCSSClass="RootItemText" />
TextContainerCSSClass="RootItemText" />









Look="lookCommon" Text="List &Rule">

Look="lookCommon" Text="&Portfolio Limit">

Look="lookCommon" Text="&Trade Rule">

Text="&List">




Look="lookCommon" Text="Save &As">

Look="lookCommon" Text="&Print">

Look="lookCommon" Text="&Run Holdings Check">








4 Replies

JL Julie Levy January 4, 2007 10:36 PM UTC

Here's the html in a text file, it didn't paste into this post correctly.

MenuHTML.zip


AD Administrator Syncfusion Team January 8, 2007 10:35 AM UTC



Hi Julie,

You can overcome this problem by returning false at clientside calls.I have attached a sample as per your requirement.Attached samplelink :
PreventPostbackOnClick.zip

please let me know if you have further queries.

Thanks for using Syncfusion products.

Regards,
Maheswari


JL Julie Levy January 16, 2007 08:14 PM UTC

Hi -
thanks for your response.
We have decided to use the ExpandOnClick feature (set to true).
Once the menu is open, how can we get it to collapse on click. Even your core features sample does not do this.
Thanks,
Julie


AD Administrator Syncfusion Team January 17, 2007 11:12 AM UTC

Hi Julie,

Setting 'ExpandOnClick' property to true, only expands the menu item. Once the menu is open[Expanded] , the feature to collapse the menu item on 'Click' event is not supported.

Please let us know if you have any further queries.

Regards,
Valli.

Loader.
Live Chat Icon For mobile
Up arrow icon