This is a migrated thread and some comments may be shown as answers.
Radribbonbutton Navigation Url
12 Answers 135 Views
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 03 Apr 2011, 01:04 PM
I notice that radribbonbutton does not have a NavigationUrl Property to navigate to a specific aspx. Is there a property to navigate to aspx from the radribbonbutton. If not, How would I do it in code from the .cs file.


 protected void RadRibbonBar1_ButtonClick(object sender, Telerik.Web.UI.RibbonBarButtonClickEventArgs e)
    {
        switch (e.Button.Text)
        {
            case "Calender":
                break;

            default:
                break;
        }

12 Answers, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 04 Apr 2011, 03:48 PM
Hi Keith,

Thank you for this suggestion.
We will consider implementing this functionality and will let you know once we reach a decision on it.

You can redirect to a different page both on the server and on the client:
 - Server: using the Response.Redirect method;
 - Client: using the window.location = 'url' method.


Regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
dotnetrockerzzz
Top achievements
Rank 2
answered on 13 Apr 2011, 02:23 PM
Can you please explain on how to "Client: using the window.location = 'url' method." . I have a ribbon bar , I want to redirect the page using JavaScript or call a javascript action if  'change profile picture' item is clicked .
<telerik:RadRibbonBar   ID="RadRibbonBar1" style="visibility:hidden;"   runat="server" Skin="Office2007"
                                    Height="0px" Width="197px">
            <telerik:RibbonBarTab >             
                <telerik:RibbonBarGroup Width="250px" Height="10px" runat="server" Text="Me On Poacherhub"  >
                   <Items>                      
                        <telerik:RibbonBarButton runat="server" ImageUrl="../Images/profile.png" Text="Change Profile Picture" Size="Medium"   />
                         
                        <telerik:RibbonBarButton ImageUrl="../Images/application-icon.png" Text="Applicaions I Am Using" Size="Medium"   />
 
<telerik:RibbonBarButton ImageUrl="../Images/friends.jpeg" Text="View All My Friends  " Size="Medium"   />
                    </Items>
                </telerik:RibbonBarGroup>             
            </telerik:RibbonBarTab>          
        </telerik:RadRibbonBar>
 
0
Nikolay Tsenkov
Telerik team
answered on 18 Apr 2011, 03:02 PM
Hello Vaibhav,

You can register a JavaScript object (using RegisterClientScript), containing the url's that are assigned for different buttons and client-side on ClientButtonClicking to to navigate using this object.

Here is a nice article on objects used as associative arrays in JavaScript: http://www.quirksmode.org/js/associative.html

And about the actual navigation:
 - you can navigate using JavaScript like follows:
window.location.href = "/somewhere/else";


Regards,
Nikolay Tsenkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Andrej
Top achievements
Rank 1
answered on 04 May 2011, 04:36 PM
+1 vote for this feature

Thanks.
0
Gordon
Top achievements
Rank 1
answered on 03 Jun 2011, 04:27 PM
I agree that this would be a very good feature to have.  We are currently using the Value property in the radribbonbutton as the navigation url.  We then use the button click event with a response.redirect(value) to forward to the proper page.
0
John
Top achievements
Rank 1
answered on 06 Jun 2011, 04:32 PM
I'm doing the same thing with the value parameter.  It would be nice to have a navigation url or even a onclientclick event built in for all buttons, including stribbuttons.
0
Nikolay Tsenkov
Telerik team
answered on 08 Jun 2011, 06:23 PM
Hello,

@John: "It would be nice to have a navigation url or even a onclientclick event built in for all buttons, including stribbuttons."
 - There already is such event(s): http://www.telerik.com/help/aspnet-ajax/ribbonbar-client-buttonclicking.html
And it works for buttons inside of ButtonStrip, also.
You can check the rest of the events in the ClientEvents section.

Although, we are convinced that the RibbonBar is a tool bar not a navigational menu, and should be use application-like style, we will consider implementing this feature as we always strive to keep our customers involved in the future development of our products.

Thank you all, for sharing your thoughts on the topic. I cannot commit on ETA, but I can inform you about our decision in this same thread.


Regards,
Nikolay Tsenkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
John
Top achievements
Rank 1
answered on 08 Jun 2011, 08:25 PM
Maybe I'm missing something, but it seems that there is only one onclientclick per button bar, I was looking for a onclientclick per actual button.  I'm handling it now when creating the button groups by adding an onclick attribute to the button it self.

As for the RibbonBar being a tool bar and not a navigation bar, it all depends on how the website you are developing is structured.  The way my company is trying to implement it, its using it as a blending of both.  Some tabs are used for navigation, and others as traditional application style tools depending on where you are in the site, which tab is active, and what it is you are trying to do on that given page.
0
Nikolay Tsenkov
Telerik team
answered on 13 Jun 2011, 04:55 PM
Hi John,

"Maybe I'm missing something, but it seems that there is only one onclientclick per button bar, I was looking for a onclientclick per actual button."
 - I apologize, but I don't understand what exactly do you mean. Could you, please, be a bit more specific?
Thanks!


Regards,
Nikolay Tsenkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Steven
Top achievements
Rank 1
answered on 10 Apr 2012, 12:58 AM
+1 for this feature as well. 

Thanks,

Steve
0
Paul
Top achievements
Rank 1
answered on 09 Mar 2015, 07:49 AM
+1 for this feature - 3 years and still waiting!
0
Ivan Danchev
Telerik team
answered on 10 Mar 2015, 04:50 PM
Hello,

You can get the clicked button through the EventArgs method get_button() in the OnClientButtonClicking event and then apply your custom logic depending on which button was clicked.

But if you feel that a new feature would be useful to have you can log it in our Feedback Portal.

Regards,
Ivan Danchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Asked by
Keith
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
dotnetrockerzzz
Top achievements
Rank 2
Andrej
Top achievements
Rank 1
Gordon
Top achievements
Rank 1
John
Top achievements
Rank 1
Steven
Top achievements
Rank 1
Paul
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or