Highlighting a perticular row in a gridview

Posted by Suneel161 under Regular Expressions on 4/30/2010 | Views : 1087 | Status : [Member] | Replies : 3
Hi,
In a gridview i have taken a column name as Resourcestatus,in that i have some fields like contractcompleted and oncontract.

if it is contractcompleted then that perticular row should be highlighted with some color. how to slove this.




Responses

Posted by: Pavanandey on: 4/30/2010 [Member] Bronze

Up
0
Down
IN row databound of the gridview u can find the status and change the colour of the row

Thanks
Pavan Kumar
Mark Answer if this fits the need

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Suneel161 on: 4/30/2010 [Member] Starter

Up
0
Down
if it is possible,can you send me the code.

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pavanandey on: 4/30/2010 [Member] Bronze

Up
0
Down
protected void Gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.BackColor = System.Drawing.Color.Black;
}
}

Thanks
Pavan Kumar
Mark Answer if this fits the need

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response