Question : Merge cells in gridview

Merge Griview cell

Hi experts,
Pls see the image.Where there is space,below Monday column,I want to remove that.

Currently my code looks like
  protected void GridMyScheduledTask_RowDataBound(object sender, GridViewRowEventArgs e)
        {
           
            e.Row.Cells[0].CssClass = "locked";
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                if (e.Row.RowIndex == 0)
                    e.Row.Cells[0].RowSpan = ((IDataReader)GridMyScheduledTask.DataSource).FieldCount;
                else
                    e.Row.Cells.Remove(e.Row.Cells[0]);
}

 public void GetMyScheduledTask()
        {
            rowGridMyScheduledTask.Visible = true;
            rowGridMyTask.Visible = false;
            bool isRow = false;

            IDataReader oReader1 = BusinessLayerHelper.MyWd.GetMyScheduledTask(Session["UserId"]);

            if (oReader1 != null)
                WDUtils.PopulateGrid(GridMyScheduledTask, oReader1);
            else
                oReader1.Close();
}

How can I merge the blank cells,it may come anywhere.
Your help is very much appreciated.
Attachments:
 
Gridview
Gridview
 

Answer : Merge cells in gridview

Random Solutions  
 
programming4us programming4us