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
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
<
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
>
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.
Thanks.
@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.
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.
"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.
Thanks,
Steve
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.