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.

Sanjeeb LenkaPosted Aug 20, 2013, 1:23 AM
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx
and read it from REMARK.
all are important to read as a developer. you have to know all the things.
Iftikar HussainPosted Aug 20, 2013, 1:21 AM
Before the GridView control can be rendered, each row in the control must be bound to a record in the data source. The RowDataBound event is raised when a data row (represented by a GridViewRow object) is bound to data in the GridView control. This enables you to provide an event-handling method that performs a custom routine, such as modifying the values of the data bound to the row, whenever this event occurs.
Regards,
Iftikar
Sanjeeb LenkaPosted Aug 20, 2013, 1:20 AM
in aspx:
Bineesh ViswanathPosted Aug 20, 2013, 1:18 AM
I likes to know from you:-
1) what is meant by RowDataBound event?
2) In which situations, this became useful?
3) is learning this event would be very useful in our future?
Iftikar HussainPosted Aug 20, 2013, 1:07 AM
Set the style directly in your GRIDVIEW for those column
Regards,
Iftikar
Vishwas KadamannayaPosted Aug 20, 2013, 1:00 AM
I believe this e.Row.Cells[4].Text == "Select" wont work as it seems to link button and not a free cell text.