Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Menu > set Autopostback to false

Answered set Autopostback to false

Feed from this thread
  • L Master avatar

    Posted on Feb 4, 2012 (permalink)

    hi

    My menu is bound to a sqldatasource and i would to disable the autopostback on the parent item.

    I know the parent item autopostback can be disable when you build your menu manually but how do i do so when my menu is data bound to a sqldatasource? Thanks

    Reply

  • Answer Kate Kate admin's avatar

    Posted on Feb 8, 2012 (permalink)

    Hi L,

    You can subscribe on the OnClientItemClicking event , check if the clicked item is rootitem and if so cancel the postback of the page:
     
    <script type="text/javascript">
    function onClicking(sender, eventArgs)
    {
      var item = eventArgs.get_item();
        
      if (item.get_level() == 0)
      {
          eventArgs.set_cancel(true);
      }
    }
    </script>
    <telerik:RadMenu ID="RadMenu1" runat="server"
       OnClientItemClicking="onClicking">

    Greetings,
    Kate
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Menu > set Autopostback to false
Related resources for "set Autopostback to false"

[  ASP.NET Menu Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]