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

[Solved] Show Image on RowMouseOver

1 Answer 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 1
Joshua asked on 19 May 2008, 03:07 PM
I am trying to show and image only on row mouse over.  and once the row is click(as stated above), keep this picture showing.  onrowmouseout, the image would disappear.  Not just mousing over the image, but mouse over the row.  Any help would be greatly appreciated.

Thanks for you help.

Joshua

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 19 May 2008, 03:39 PM
Hi Joshua,

If I understand you correctly, you want an image to appear on row mouseover and to disappear when you mouseout the row. Is that correct?

However, I am not sure whether you want the image to be a background image or an ordinary <img /> element.

1)

If you want the image to be a background image, then please use it in a CSS rule controlling the row hover style:

.GridRowOver_SkinName
{
     background: ....... ;
}

In addition to adding this CSS rule somewhere in your web applications, you will also have to set EnableRowHoverStyle="true" in the grid's client settings.


2)

If you want the image to be an <img /> element, then you can add a CSS class (e.g. ImageCell ) to the table cell in which the image resides and then add the following CSS rules:


.ImageCell  img
{
     visibility:hidden;
}

.GridRowOver_SkinName  .ImageCell  img
{
    visibility:visible;
}


You can add the table cell CSS class programmatically or declaratively, depending on your scenario and preferences. Let us know if you need further assistance with that.


All the best,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Joshua
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or