如果對電腦相關有興趣的人
應該對於天瓏書局不陌生
再買完想要買的書(Stylin' with CSS)之餘
又翻了其它相關的書
其中在CSS Mastery看到了一個之前寫GridView想要作的效果
在滑鼠移動到Column時
能夠改變Column的顏色
當然這個功能可以直接用Code Behind的方法來完成
如果不想要用Code Behind的方法
亦可以選擇利用Css的Style來完成
Code Behind 方法:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e){
if (e.Row.RowType == DataControlRowType.DataRow){
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='blue'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='white'");
}
}
Css Method:
- Embed Css Style:
tr.on{background-color:#bbccaa;color:#446666;}
tr.off{background-color:#446666;} - Add tr Attribute:
tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
CustomerID | CompanyName | ContactName |
---|---|---|
ALFKI | Alfreds Futterkiste | Maria Anders |
ANATR | Ana Trujillo Emparedados y helados | Ana Trujillo |
ANTON | Antonio Moreno Taqueria | Antonio Moreno |
AROUT | Around the Horn | Thomas Hardy |
Big Data and Hadoop is an ecosystem of open source components that fundamentally changes the way enterprises store, process, and analyze data.
ReplyDeletepython training in bangalore
aws training in bangalore
artificial intelligence training in bangalore
data science training in bangalore
machine learning training in bangalore
hadoop training in bangalore
devops training in bangalore
corporate training companies
ReplyDeletecorporate training companies in mumbai
corporate training companies in pune
corporate training companies in delhi
corporate training companies in chennai
corporate training companies in hyderabad
corporate training companies in bangalore
Gaining Python certifications will validate your skills and advance your career.
ReplyDeletepython certification
I learned World's Trending Technology from certified experts for free of cost. I got a job in decent Top MNC Company with handsome 14 LPA salary, I have learned the World's Trending Technology from Data science training in btm layout experts who know advanced concepts which can help to solve any type of Real-time issues in the field of Python. Really worth trying Instant Approval Blog Commenting Sites List
ReplyDelete
ReplyDeleteI loved reading your post because of clear font style and size.Very helpful content for readers.Thanks for posting.Enroll in big data courses and get placement assistant.Big data refers to the large, diverse sets of information that grow at ever-increasing rates
big data training institute in btm
Excellent Blog. Thank you so much for sharing.
ReplyDeletepython training in bangalore | python online training
aws online training in bangalore | aws online training
artificial intelligence training in bangalore | artificial intelligence online training
machine learning training in bangalore | machine learning online training
data science training in bangalore | data science online training