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
1 Answer, 1 is accepted
0
Accepted
Kate
Telerik team
answered on 08 Feb 2012, 04:46 PM
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:
<scripttype="text/javascript">
function onClicking(sender, eventArgs)
{
var item = eventArgs.get_item();
if (item.get_level() == 0)
{
eventArgs.set_cancel(true);
}
}
</script>
<telerik:RadMenuID="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 >>