If you are using winforms this would be how you achieve what you are looking for.
Im not entirely sure what the last part means as i dont know what 1 to 4 session means.
"for 1/7/12 1to 4 session give fore color and background color different.
for 1/8/12 1to 4 session give fore color and background color different."
private void gridview_RowStyle(object sender, RowStyleEventArgs e)
{
GridView View = sender as GridView;
if (e.RowHandle >= 0)
{
string searchOne = View.GetRowCellDisplayText(e.RowHandle, View.Columns["1/7/12"]);
string searchTwo = View.GetRowCellDisplayText(e.RowHandle, View.Columns["1/8/12"]);
if (searchOne == "1/7/12")
{
e.Appearance.BackColor = Color.SkyBlue;
e.Appearance.ForeColor = Color.LightBlue;
}
if (searchOne == "1/8/12")
{
e.Appearance.ForeColor = Color.Brown;
e.Appearance.BackColor = Color.Purple;
}
}
}