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
305
Disable postback for unlinked menu items?
posted

Hi,

i tried nearly everything but i dont find the way how to avoid postbacks on a click on unlinked menu items or parent items.

I will describe it on an example to make it clear. Look at this menustrukture:

Options

  • Option1...
  • Option2..
  • More > Another Submenu

If the user press "Options" or "More" there should be no postback because their is no tag, no url and nothing else defined. So the page will reload and it will happen nothing.

 How is it possible to disable this behavior? I tried to step though the show cases but i was not able to find the tag or trick to do so.

Thank you very much

Holger

 

Parents
No Data
Reply
  • 230
    posted

    I need to disable the postback on the code behind.  When the user selects a top level node, I want nothing to happen.  How would I go about doing that.  I have the following code but nothing in the event args gives me access to deny postback:

     

    Private Sub um1_MenuItemClicked(ByVal sender As System.Object, ByVal e As Infragistics.WebUI.UltraWebNavigator.WebMenuItemEventArgs) Handles um1.MenuItemClicked

    Dim newItem As Infragistics.WebUI.UltraWebNavigator.Item

    Dim SelectedItems As New Infragistics.WebUI.UltraWebNavigator.ItemDim cookieCols As HttpCookieCollection, cookie As HttpCookie

    cookieCols = Request.Cookies

    Select Case e.Item.Text

    Case Is = "Logout"

    Case Is = "Help"

    Dim e1 As New CommandEventArgs("", System.DBNull.Value)

    RaiseEvent MenuHelpClicked(Me, e1)

     

    End Select

    Case Is = "Reports" ?

     

Children