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

Cell hover backcolor

3 Answers 80 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tyler Thompson
Top achievements
Rank 1
Tyler Thompson asked on 19 May 2009, 06:14 PM
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

Sort by
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.

Sincerely yours,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Tyler Thompson
Top achievements
Rank 1
answered on 22 May 2009, 08:14 PM
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.

Regards,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Tyler Thompson
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Tyler Thompson
Top achievements
Rank 1
Share this question
or