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

Bread crumb bulid

1 Answer 48 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Prasad
Top achievements
Rank 1
Prasad asked on 20 Jan 2014, 11:33 AM
Hello,
Is there any way to get the bread crumb based on the Rad menu item selection. I am unable to get the Click event for the rad menu. please check my java script code.

//Disable the embedded scripts for the Main Nav RadMenu
function OnClientItemOpening(sender, eventArgs) {
    eventArgs.set_cancel(true);
};

Is there any flaw in the above code snippet.

Regards,
Prasad.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Jan 2014, 04:52 AM
Hi Prasad,

I guess you want to cancel the OnClientItemClicking event of RadMenu based on some condition. Please have a look into the following code snippet which works fine at my end.

ASPX:
<telerik:RadMenu ID="RadMenu1" runat="server" OnClientItemClicking="OnClientItemClicking1"
    OnClientItemClicked="OnClientItemClicked1">
    <Items>
        <telerik:RadMenuItem Text="Item1">
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Text="Item2">
        </telerik:RadMenuItem>
    </Items>
</telerik:RadMenu>

JavaScript:
<script type="text/javascript">
    function OnClientItemClicking1(sender, args) {
        //your code
        if (args.get_item().get_text() == "Item1")
            args.set_cancel(true);
    }
    function OnClientItemClicked1(sender, args) {
        alert("Fired");
    }
</script>

Let me know if you have any concern.
Thanks,
Princy.
Tags
Menu
Asked by
Prasad
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or