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

Change Button Color on Click

1 Answer 198 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Francesco Vivaldi
Top achievements
Rank 1
Francesco Vivaldi asked on 12 May 2011, 05:21 PM
Hi, i have a radtoolbar, with 5 button.

when i click on a button i want to change teh background color of the clicked button.

my button:
A=red-> response.redirect(a.aspx)
B=blue->response.redirect(b.aspx)
C=green
D=black
E=purple

if i click on A button, A button must become red
if i click on B button, B button must become blue.

The toolbar is in a MasterPage, when i click on a button i do a response.redirect to a specific page linked to the button.

if i click on A button i redirect to A.aspx page, and in masterpage the A button on radtoolber must become red.

how i can do it ?

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 17 May 2011, 09:43 PM
Hi Francesco Vivaldi,



You could use OnClientButtonClicking event and attach an event handler to assign diffrent backgroundColor to the different buttons. Here is a help article with detailed explanation how you can find a particular button. Then using the desired button you can assign color as follows: item.style.backgroundColor="ff8080";



Greetings,

Kate
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.

Tags
ToolBar
Asked by
Francesco Vivaldi
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or