Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
5
Answers
change back color if gridView cells has empty.
Sk Jha
7y
226
1
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;
}
}
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
Google Chrome Push Notification
How Save Many PDF file in the Same Physical path