//从grd的第rowIndex行colIndex列单元格向右count列合并
public static void 合并列(this GridView grd, int rowIndex, int colIndex, int count)
{
grd.Rows[rowIndex].Cells[colIndex].ColumnSpan = count;
for (var i = 1; i < count; i++)
grd.Rows[rowIndex].Cells[colIndex + i].Visible = false;
}
参考:http://bbs.csdn.net/topics/370192896 sp大仙的回答
注意:合并列以后还需要隐藏其它显示的列,否则样式必乱