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

Change background image & selected background color

2 Answers 180 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 07 Jan 2011, 07:30 PM
Hi all,

In my website, every user has his/her own color and background image for Menu which are already saved in the database.
For example, user A has Image1, and Orange color.
Now I would like to apply Image1 for Menu background and Orange for selected Item on Menu.
I don't want to create a CSS for each user. 
What I need is using one CSS for all users and modified the code in the Server side to set the background image and color of selected item for particular user.

Thanks.

Andy.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Jan 2011, 08:16 AM
Hello Andy,


One suggestion is setting the RadMenuItem property in ItemDataBound event, based on the condition.

Another option is setting "Custom attribute" to menu item and setting the color of the item based on attribute value. Set the attribute value in ItemDataBound event, and access the value in client side "OnClientItemClicked" event to set the backgroundColor(from client side).


-Shinu
0
Andy
Top achievements
Rank 1
answered on 10 Jan 2011, 04:16 PM
Hi Shinu,

Thanks for your response.
Could you show me how to change the background image in the server side?

Thanks.

Andy.
Tags
Menu
Asked by
Andy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Andy
Top achievements
Rank 1
Share this question
or