Detect RadMenuItem PostBack=False Client-Side

2 posts, 0 answers
  1. Digifox
    Digifox avatar
    3 posts
    Member since:
    Apr 2007

    Posted 31 Mar 2015 Link to this post

    Is there any way to detect during OnClientItemClicking/OnClientItemClickedwhether a RadMenuItem has PostBack=False? 
  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 03 Apr 2015 Link to this post

    Hello Andreas,

    In order to verify of a postback will occur when certain item is clicked you can use the _shouldPostBack() function, called on a reference of the RadMenuItem. Please consider the below implementation:

    <script type="text/javascript">
            function OnClientItemClicking(sender, args) {
                var item = args.get_item();
                if(!!item._shouldPostBack()) {
                    alert("will do postback")
                }
            }
        </script>

    Regards,
    Nencho
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top