Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
change back color if gridView cells has empty.
Sk Jha
Dec 21 2017 3:16 AM
211
Reply
how to change specific cells backcolor if cells has no data in gridview in asp.net
my code is here..
for
(
int
i = 0; i < GridView1.Row.Cells.Count; i++)
{
if
(GridView1.Row[i].Cells[2].Text ==
""
)
{
GridView1.Row[i].Cells[2].BackColor = Color.Red;
}
else
{
GridView1.Row[i].Cells[2].BackColor = Color.Green;
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
Google Chrome Push Notification
How Save Many PDF file in the Same Physical path