I apologize if I am missing something obvious but, I would like to have an individual cell change its backcolor when the mouse is over it not the entire row. How can I do this with the theme builder or in the cellformatting event?
Thank you
3 Answers, 1 is accepted
0
Deyan
Telerik team
answered on 22 May 2009, 12:54 PM
Hi Tyler,
Thanks for contacting us.
You can define a visual style for the GridDataCellElement when the mouse cursor is over it by using the Visual Style Builder.
To do so follow these steps:
1. Open the Visual Style Builder and load the RadGridView control.
2. Load the theme that you would like to modify.
3. Take a look at the element tree on the left and find GridDataCellElement node.
4. Select this node and take a look at the Conditions Tab Strip below the designer window. Add a new condition by clicking on the green "+" sign at the right side of the last tab in the tab strip.
5. Select the new condition and open its editor by clicking on the "pencil" icon on the tab.
6. In the dialog window that appears uncheck the "Auto unapply" check box and by using the drop down button on the right, select the "IsMouseOver" property.
7. Click OK.
In this way you have created a new state for the GridDataCellElement which will be triggered when the mouse is over it. You can use the Property Grid of the GridDataCellElement on the right of the Visual Style Builder in order to modify the visual appearance of the cell when this state is active. Please note that you will also have to specify a state that defines the appearance of the cell when the mouse is not over it, otherwise the applied visual settings will not be reset.
I hope this will help you to achieve your goal.
Do not hesitate to write back if you need further assistance.
Thank you for your help Deyan. I will give it a try.
0
Deyan
Telerik team
answered on 25 May 2009, 07:19 AM
Hi Tyler,
Something that I forgot to mention in my previous post is that you will have to save the modified theme in a new file and load it by using the RadThemeManager component in order to be able to use it in your application.
Do not hesitate to write back if you need further assistance.