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

RadMenu + RadWindows

3 Answers 69 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jose Luiz Borges
Top achievements
Rank 2
Jose Luiz Borges asked on 21 Jul 2011, 08:59 PM
Hello,
I have the form in the menu (RadMenu), and this menu as I generate my database, the CS is as follows:

             Menu.Items.Clear ();


             Menu.DataTextField = "text";
             Menu.DataFieldID = "cd_menu";
             Menu.DataFieldParentID = "cd_menuID";
             Menu.DataNavigateUrlField = "Navigate";
             Menu.DataSource fnBusiness.GetMenu = (cd_modulo, cd_usuario);
             Menu.DataBind ();

and is working perfectly, but has emerged ...
by clicking the menu items will not open on another page but in a new page as popup.

I have this code
openPopUp function (url, name) {
     window.open (url, name, 'width = 400px, height = 400px, resizable = no, modal = yes ");
}


Is there a way of clicking the menu item he did not open the page, but call this function passing as parameter the DataNavigateUrlField?

Thanks to all

3 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 22 Jul 2011, 02:34 PM
Hello Jose,

I'm assuming you want to open the url's of the RadMenu using that method you mention, if so, you handle the OnClientItemClicking event. Like so:

function OnClientItemClicking(sender, args){
    var item = eventArgs.get_item();
    var navigateUrl = item.get_navigateUrl();
      
    if(navigateUrl && navigateUrl != "#") {
        openPopUp(navigateUrl,"");
        args.set_cancel(true);
    }
}

I hope that helps.
0
Jose Luiz Borges
Top achievements
Rank 2
answered on 22 Jul 2011, 05:23 PM
Hello

thanks for the reply ... it worked perfectly even ...
(sorry for posting your question, if I had the most sought would have found on the web, but my English is not 100 %...)

Now that I have the script, and how many screens (aspx) to call ... the possibility of
just put a radWindowsManager and he be in charge of opening the windows?

not to have to declare a RadWindows for each screen to open the browser ..


Thanks again ...
0
Peter
Telerik team
answered on 25 Jul 2011, 11:29 AM
Hi Jose,

You can use the Client API of RadWindowManager for this purpose.

Let me know if this is helpful.


Greetings, Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Menu
Asked by
Jose Luiz Borges
Top achievements
Rank 2
Answers by
Kevin
Top achievements
Rank 2
Jose Luiz Borges
Top achievements
Rank 2
Peter
Telerik team
Share this question
or