Radmenu OnClientItemClicking

3 posts, 0 answers
  1. Praveen
    Praveen avatar
    3 posts
    Member since:
    Feb 2012

    Posted 22 Feb 2012 Link to this post

    Hi,
    I want to open Radwindow on OnClientItemClicking event of Radmenu which works perfect for me, only issue is that i do not want to open every url on Radwindow on link that falls under Reports (Main Menu) should open in radwindow rest should is normal redirect.. i do not know how to achive this, i have attached sample code below, for your info i am binding Radmenu at runtime through code.

    My menu structure is

    Home     Reports           Admin
    Report1
                    Report2
                    Report3
    i want to open only report1/report2/report3 etc in radwindow.

    function onClicking(sender, eventArgs) {
                var item = eventArgs.get_item();
                var navigateUrl = item.get_navigateUrl();
                   if (navigateUrl && navigateUrl != "#") {
                   radopen(null, "RadWindow1");
                   eventArgs.set_cancel(true);
                }
                 
            }
    <telerik:RadMenu ID="RadMenu1" runat="server" Style="z-index: 4" EnableRoundedCorners="true"
                            EnableShadows="true" Skin="WebBlue" OnClientItemClicking="onClicking" />
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" >
                            <Windows>
                                <telerik:RadWindow ID="UserListDialog" runat="server" Title="Delivery details" Height="400px"
                                    Width="600px" Left="400px" ReloadOnShow="true"  ShowContentDuringLoad="false"
                                    Modal="true"/>
                            </Windows>
    </telerik:RadWindowManager>


  2. Praveen
    Praveen avatar
    3 posts
    Member since:
    Feb 2012

    Posted 23 Feb 2012 Link to this post

    Dear All,

    Can someone put lights on this..its pretty urgent..entire project is held up because of this..

    Regards
    Praveen 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Abhishek
    Abhishek avatar
    45 posts
    Member since:
    Jul 2012

    Posted 23 Feb 2012 Link to this post

    Hello Praveen,

    Please put the below logic in your code. its works.
    protected void rmViews_OnItemCreated(object sender, RadMenuEventArgs e)
            {
                if (e.Item is RadMenuItem)
                {
                    if (e.Item.Level == 1)
                    {
                        e.Item.PostBack = false;
                        e.Item.NavigateUrl = "http://www.google.com;";
                    }
                }
            }

    Let me know if any issue.


    Thanks,
    Abhishek K
Back to Top