This is a migrated thread and some comments may be shown as answers.

Detect RadMenuItem PostBack=False Client-Side

1 Answer 66 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Digifox
Top achievements
Rank 1
Digifox asked on 31 Mar 2015, 04:18 PM
Is there any way to detect during OnClientItemClicking/OnClientItemClickedwhether a RadMenuItem has PostBack=False? 

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 03 Apr 2015, 08:18 AM
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.

 
Tags
Menu
Asked by
Digifox
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or