在网格视图中突出显示特定的行 [英] Highlight specific row in a gridview
本文介绍了在网格视图中突出显示特定的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi,
I have an requirement in my application i was showing Employee Designations according to their manager level in a GridView Control. Based on Employee Designation i need to have a coloring on every different designations of an employee.
EX:
If employee desig is :Associate->show in Blue color
If employee desig is :Senior Associate->show in Greencolor
If employee desig is :Team Lead->show in Red color
from Stored Procedure.
推荐答案
您好,也请尝试
请参阅:使用JavaScript选择GridView行
谢谢
Hello , Try this also
Refer : Using JavaScript To Select GridView Rows
thanks
也许这篇文章对您有帮助
更改行中颜色ASP.NET中的GridView [
Maybe this Article will help you
Changing the color of a row in a GridView in ASP.NET[^]
//Check if it is not header or footer row
if (e.Row.RowType == DataControlRowType.DataRow)
{
//Check your condition here
If(Condition True)
{
e.Row.BackColor = Drawing.Color.Red // This will make row back color red
}
}
这篇关于在网格视图中突出显示特定的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文