How to Assign Color to Row Programmatically in Listview

Posted by Ravimakhija88 under ASP.NET on 10/12/2011 | Points: 10 | Views : 5871 | Status : [Member] | Replies : 2
hi,

how to assign color to particular row programmatically in list view for eg.
when any cell contains 'sales' word .the whole row should be red colored.




Responses

Posted by: Ndebata on: 10/13/2011 [Member] Starter | Points: 25

Up
0
Down
Try to use ItemDataBound event to find the row containing the matched dataitem , then change the row background.

Take a look at this article
http://www.dotnetfunda.com/articles/article1623-change-background-colour-of-the-whole-item-of-a-list-view.aspx

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

Posted by: Syedshakeer on: 10/13/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,
Check the below link may help you.

http://www.sharepointjohn.com/asp-net-c-change-gridview-cell-background-color-based-on-value/



Syed Shakeer Hussain

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

Login to post response