Dear brother's
I want to show on or more than one rows of gridview in red color... how this can be possible.. if any one have some idea please share with me.. i will wait for good response..
thanks in advance.
Best regards
Waqar Husssain Laghari
Sindh
waqar laghariPosted Mar 27, 2009, 8:38 AM
Dear brother's,
I found the answer which is followed.. if any one has problem in this function then please post me..
protected void GrdDetailed_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView drv = e.Row.DataItem as DataRowView;
object obj = drv["AttendanceHours"];
object TimeIn = Dt.Rows[e.Row.RowIndex][3];
object Timeout = Dt.Rows[e.Row.RowIndex][4];
if (Timeout.ToString() == "" && TimeIn.ToString() != "")
{
e.Row.ForeColor = System.Drawing.Color.Red;
}
}
}
Thanks
Best regards
Waqar Hussain Laghari