| |

VerySource

 Forgot password?
 Register
Search
View: 658|Reply: 1

When the mouse hovers over the row of the gridview, the font of the row changes color, please help!

[Copy link]

2

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-9 14:00:02
| Show all posts |Read mode
I want to realize that when the mouse is over the row of the gridview, the font of that row can be changed, because this row is a hyperlink column, and the underline of the column can be seen when the mouse is moved. And I ca n’t see the underline anymore, please give pointers!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-15 18:45:01
| Show all posts
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if ((e.Row.RowType == DataControlRowType.DataRow))
        {
            //e.Row.Cells[1].Visible = false;

            //Change color
            e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#FFC080'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#ffffff'");
        }
    }
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list