呵呵  很简单的  照着我给你这个写就可以了  
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
        {
            switch (e.Row.RowType)
            {
                case DataControlRowType.Header:
                    //第一行表头
                    TableCellCollection tcHeader = e.Row.Cells;
                    tcHeader.Clear();
                    tcHeader.Add(new TableHeaderCell());
                    tcHeader[0].Attributes.Add("rowspan", "2"); //跨Row
                    tcHeader[0].Attributes.Add("bgcolor", "#1c67bc");
                    tcHeader[0].Text = "月份";
                    tcHeader.Add(new TableHeaderCell());
                    //tcHeader[1].Attributes.Add("bgcolor", "Red");
                    tcHeader[1].Attributes.Add("colspan", "3"); //跨Column
                    tcHeader[1].Attributes.Add("bgcolor", "#1c67bc");
                    tcHeader[1].Text = "耗油情况总量(单位:元)";
                    tcHeader.Add(new TableHeaderCell());
                    //tcHeader[1].Attributes.Add("bgcolor", "Red");
                    tcHeader[2].Attributes.Add("rowspan", "2");
                    tcHeader[2].Attributes.Add("bgcolor", "#1c67bc");
                    tcHeader[2].Text = "实际耗油总量";
                    tcHeader.Add(new TableHeaderCell());
                    //tcHeader[1].Attributes.Add("bgcolor", "Red");
                    tcHeader[3].Attributes.Add("rowspan", "2");
                    tcHeader[3].Attributes.Add("bgcolor", "#1c67bc");
                    tcHeader[3].Text = "操作</th></tr><tr  style='color:#FFFFFF'>";
                    //第二行表头
                    tcHeader.Add(new TableHeaderCell());
                    tcHeader[4].Attributes.Add("bgcolor", "#1c67bc");
                    tcHeader[4].Text = "油耗额定总量";
                    tcHeader.Add(new TableHeaderCell());
                    tcHeader[5].Attributes.Add("bgcolor", "#1c67bc");
                    tcHeader[5].Text = "节支总量";
                    tcHeader.Add(new TableHeaderCell());
                    tcHeader[6].Attributes.Add("bgcolor", "#1c67bc");
                    tcHeader[6].Text = "超支总量(长途油耗)";                    break;
            }
        }