This is a migrated thread and some comments may be shown as answers.
Radmenu OnClientItemClicking
2 Answers 73 Views
This is a migrated thread and some comments may be shown as answers.
Praveen
Top achievements
Rank 1
Praveen asked on 22 Feb 2012, 08:03 AM
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 Answers, 1 is accepted

Sort by
0
Praveen
Top achievements
Rank 1
answered on 23 Feb 2012, 07:59 AM
Dear All,

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

Regards
Praveen 
0
Abhishek
Top achievements
Rank 2
answered on 23 Feb 2012, 08:28 AM
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
Tags
Menu
Asked by
Praveen
Top achievements
Rank 1
Answers by
Praveen
Top achievements
Rank 1
Abhishek
Top achievements
Rank 2
Share this question
or