TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bineesh Viswanath
NA
1k
775.4k
ASP.NET GridView RowDataBound Event
Aug 20 2013 12:57 AM
Sir, I want your help in the GridView RowDataBound Event in ASP.NET.
Let's see the gridView:-
I likes to have BackColor to the column- SELECT and DELETE.
I just tried a coding for this. Here the code
protected void dgvMovie_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[4].Text == "Select")
{
e.Row.BackColor = System.Drawing.Color.LightBlue;
}
if (e.Row.Cells[5].Text == "Delete")
{
e.Row.BackColor = System.Drawing.Color.LightBlue;
}
}
}
So If the code have logical error, please rectify it.
Reply
Answers (
6
)
display top to bottom in datalist
Twitter post