Click here to Skip to main content
15,916,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
am using asp.net c#, Sqlserver 2005

on my webpage I have Gridview with data fill in it.

In My database table I have a column Name Status in it. In Status it has 0 and 1 as Status,

If the Status = 1 the Gridview row Forecolor Must change to Red color.
else
if the Status = 0 leave as previous color.

Please can you help me.
This is to be done when pageload itself.

Thanks.
Posted
Comments
Wombaticus 7-Sep-14 6:40am    
Do it in the RowDataBound event - get the value of the Status column for that row and set the forecolor apprpriately.
Software Engineer 892 7-Sep-14 6:55am    
Please can you show me.
Thanks.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900