Hi. I am creating an asp.net web site. Using GridView the website creates a table. Now my question is I want to color the text "NO" red within the table cells. Waiting for your reply.Please keep in mind my code is written in C# so any C# examples would be greatly welcomed...
johnroach1985 0 Junior Poster
Recommended Answers
Jump to Posthi,
u can use below for adding color to gridview
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { int i,j; string c; for (i = 0; i <= GridView1.Rows.Count - 1; i++) { for (j = 0; j <= GridView1.Rows.Cells.Count-1; j++) { c = GridView1.Rows.Cells[j].Text; if (c == …
All 7 Replies
akela_p501usa 0 Newbie Poster
johnroach1985 0 Junior Poster
akela_p501usa 0 Newbie Poster
johnroach1985 0 Junior Poster
hemantksh 0 Newbie Poster
manoshailu 12 Junior Poster
johnroach1985 commented: this code saved my life.It looks like a simple yet effective to paint within a gridview.... +4
arjunsasidharan commented: Good solution. Use code tags next time.:) +3
johnroach1985 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.