Bread crumb bulid

2 posts, 0 answers
  1. Prasad
    Prasad avatar
    40 posts
    Member since:
    Sep 2011

    Posted 20 Jan 2014 Link to this post

    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.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 20 Jan 2014 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top