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.
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.
//Check if it is not header or footer row
if (e.Row.RowType == DataControlRowType.DataRow)
//Check your condition here
e.Row.BackColor = Drawing.Color.Red // This will make row back color red
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)