在GridView合并列的方法
/// <summary>
合并GridView列_职场        /// 合并GridView列
合并GridView列_职场        /// </summary>
合并GridView列_职场        /// <param name="gvMerge">合并的GridView ID</param>
合并GridView列_职场        /// <param name="cellNum">合并的列</param>
合并GridView列_职场        public static void GroupRows(GridView gvMerge, int cellNum)
合并GridView列_职场        {
合并GridView列_职场                int i = 0, rowSpanNum = 1;
合并GridView列_职场                while (i < gvMerge.Rows.Count - 1)
合并GridView列_职场                {
合并GridView列_职场                        ///GridViewRow 定义GridViewRow行
合并GridView列_职场                        GridViewRow gvr = gvMerge.Rows[i];
合并GridView列_职场                        for (++i; i < gvMerge.Rows.Count; i++)
合并GridView列_职场                        {
合并GridView列_职场                                ///合并RowSpanNum    
合并GridView列_职场                                GridViewRow gvrNext = gvMerge.Rows[i];
合并GridView列_职场                                if (gvr.Cells[cellNum].Text == gvrNext.Cells[cellNum].Text)
合并GridView列_职场                                {
合并GridView列_职场                                        gvrNext.Cells[cellNum].Visible = false;
合并GridView列_职场                                        rowSpanNum++;
合并GridView列_职场                                }
合并GridView列_职场                                else
合并GridView列_职场                                {
合并GridView列_职场                                        ///
合并GridView列_职场                                        gvr.Cells[cellNum].RowSpan = rowSpanNum;
合并GridView列_职场                                        rowSpanNum = 1;
合并GridView列_职场                                        break;
合并GridView列_职场                                }
合并GridView列_职场
合并GridView列_职场                                if (i == gvMerge.Rows.Count - 1)
合并GridView列_职场                                {
合并GridView列_职场                                        gvr.Cells[cellNum].RowSpan = rowSpanNum;
合并GridView列_职场                                }
合并GridView列_职场                        }
合并GridView列_职场                }
合并GridView列_职场        }