/// <summary>
        /// 表格单元格合并事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            int    rowHandle1 = e.RowHandle1;
            int    rowHandle2 = e.RowHandle2;
            string deptName1  = gridView1.GetRowCellValue(rowHandle1, gridView1.Columns["deptName"]).ToString(); //获取科室列值
            string deptName2  = gridView1.GetRowCellValue(rowHandle2, gridView1.Columns["deptName"]).ToString();
            string workDate1  = gridView1.GetRowCellValue(rowHandle1, gridView1.Columns["workDate"]).ToString(); //获取日期列值
            string workDate2  = gridView1.GetRowCellValue(rowHandle2, gridView1.Columns["workDate"]).ToString();

            if (e.Column.FieldName == "deptName")
            {
                if (deptName1 != deptName2)
                {
                    e.Merge   = false; //值相同的2个单元格是否要合并在一起
                    e.Handled = true;  //合并单元格是否已经处理过,无需再次进行省缺处理
                }
            }
            else if (e.Column.FieldName == "workDate")
            {
                if (!(deptName1 == deptName2 && workDate1 == workDate2))
                {
                    e.Merge   = false;
                    e.Handled = true;
                }
            }
            else
            {
                e.Merge   = false;
                e.Handled = true;
            }
        }
Пример #2
0
 private void view_calendar_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if (e.Column.FieldName == "fio" || e.Column.FieldName == "image")
     {
         cell_merge(sender, e);
     }
 }
Пример #3
0
 private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if (e.Column.FieldName == "ParameterName" || e.Column.FieldName == "Point" || e.Column.FieldName == "DelInfBtnStr")
     {
         e.Merge   = false;
         e.Handled = true;
     }
     else
     {
         if (e.Column.FieldName == "ExpresstionText")
         {
             //ExpressionId
             DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
             string expressionId1 = view.GetRowCellValue(e.RowHandle1, view.Columns["ExpressionId"]).ToString();
             string expressionId2 = view.GetRowCellValue(e.RowHandle2, view.Columns["ExpressionId"]).ToString();
             e.Merge   = expressionId1 == expressionId2;
             e.Handled = true;
         }
         else
         {
             e.Merge   = true;
             e.Handled = false;
         }
     }
 }
 private void bandedGridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if (e.RowHandle1 == e.RowHandle2)
     {
         e.Merge   = false;
         e.Handled = true;
     }
     else
     {
         DataRow _firstRow  = this.bandedGridView1.GetDataRow(e.RowHandle1);
         DataRow _secondRow = this.bandedGridView1.GetDataRow(e.RowHandle2);
         try
         {
             if (_firstRow["ROW_MAINID"].ToString() != _secondRow["ROW_MAINID"].ToString())
             {
                 e.Merge   = false;
                 e.Handled = true;
             }
         }
         catch (Exception ex)
         {
             RunErrorMsg = ex.Message;
         }
     }
 }
Пример #5
0
        private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            if (e.Column.AbsoluteIndex < 0 || e.Column.AbsoluteIndex >= _merge_flag.Length)
            {
                return;
            }

            if (_merge_flag[e.Column.AbsoluteIndex] == 1)
            {
                e.Column.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True;

                //object value1 = gridView1.GetRowCellValue(e.RowHandle1, e.Column);
                //object value2 = gridView1.GetRowCellValue(e.RowHandle2, e.Column);
                //if (value1.Equals(value2))
                //{
                //    e.Merge = true;
                //    e.Handled = true;
                //}
                //else
                //{
                //    e.Merge = false;
                //    e.Handled = false;
                //}
            }
            else
            {
                e.Column.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
            }
        }
Пример #6
0
 private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if ((this.gridView1.GetDataRow(e.RowHandle1)["调拨单号"].ToString() != this.gridView1.GetDataRow(e.RowHandle2)["调拨单号"].ToString()))
     {
         e.Handled = true;
     }
 }
        private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            try
            {
                if (e.RowHandle1 < 0 || gridView1.RowCount == 0)
                {
                    return;
                }
                e.Merge   = false;
                e.Handled = true;

                if (e.Column.FieldName.Contains("LINE_NM"))
                {
                    string ymd1 = gridView1.GetRowCellDisplayText(e.RowHandle1, e.Column.FieldName).Trim();
                    string ymd2 = gridView1.GetRowCellDisplayText(e.RowHandle2, e.Column.FieldName).Trim();

                    if (ymd1 == ymd2)
                    {
                        e.Merge = true;
                    }
                    else
                    {
                        e.Merge = false;
                    }
                }

                if (e.Column.FieldName.Contains("MLINE_CD"))
                {
                    string ymd1 = gridView1.GetRowCellDisplayText(e.RowHandle1, "LINE_NM").Trim() + gridView1.GetRowCellDisplayText(e.RowHandle1, e.Column.FieldName).Trim();
                    string ymd2 = gridView1.GetRowCellDisplayText(e.RowHandle2, "LINE_NM").Trim() + gridView1.GetRowCellDisplayText(e.RowHandle2, e.Column.FieldName).Trim();

                    if (ymd1 == ymd2)
                    {
                        e.Merge = true;
                    }
                    else
                    {
                        e.Merge = false;
                    }
                }
                if (e.Column.FieldName.Contains("STYLE_CD"))
                {
                    string ymd1 = gridView1.GetRowCellDisplayText(e.RowHandle1, "LINE_NM").Trim() + gridView1.GetRowCellDisplayText(e.RowHandle1, "MLINE_CD").Trim() + gridView1.GetRowCellDisplayText(e.RowHandle1, e.Column.FieldName).Trim();
                    string ymd2 = gridView1.GetRowCellDisplayText(e.RowHandle2, "LINE_NM").Trim() + gridView1.GetRowCellDisplayText(e.RowHandle2, "MLINE_CD").Trim() + gridView1.GetRowCellDisplayText(e.RowHandle2, e.Column.FieldName).Trim();

                    if (ymd1 == ymd2)
                    {
                        e.Merge = true;
                    }
                    else
                    {
                        e.Merge = false;
                    }
                }
            }
            catch
            {
            }
        }
 void myGridView_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if (!mergeFieldNameList.Contains(e.Column.FieldName))
     {
         e.Merge   = false; //值相同的2个单元格是否要合并在一起
         e.Handled = true;  //合并单元格是否已经处理过,无需再次进行省缺处理
     }
 }
Пример #9
0
 private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if (this.gridView1.GetDataRow(e.RowHandle1)["OtherSellOrderID"].ToString() != this.gridView1.GetDataRow(e.RowHandle2)["OtherSellOrderID"].ToString()
      ||
      this.gridView1.GetDataRow(e.RowHandle1)["OtherSellOrderDate"].ToString() != this.gridView1.GetDataRow(e.RowHandle2)["OtherSellOrderDate"].ToString()
      )
         e.Handled = true;
 }
 private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if ((this.gridView2.GetDataRow(e.RowHandle1)["StockOrderID"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["StockOrderID"].ToString()) ||
         (this.gridView2.GetDataRow(e.RowHandle1)["StockOrderDate"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["StockOrderDate"].ToString()) ||
         (this.gridView2.GetDataRow(e.RowHandle1)["SupplierName"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["SupplierName"].ToString()))
     {
         e.Handled = true;
     }
 }
Пример #11
0
        private void gvManager_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            Manager manager1 = gvManager.GetRow(e.RowHandle1) as Manager;
            Manager manager2 = gvManager.GetRow(e.RowHandle2) as Manager;

            if (manager1 != null && manager2 != null && manager1.LoginName == manager2.LoginName)
            {
                e.Merge = true;
            }
        }
Пример #12
0
        private void bandedGridView_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            if (e.Column.FieldName == "PLAN_AMT" || e.Column.FieldName == "TOTAL_PER")
            {
                string strRoomType1 = bandedGridView.GetRowCellValue(e.RowHandle1, bandedGridColumn1).ToString();
                string strRoomType2 = bandedGridView.GetRowCellValue(e.RowHandle2, bandedGridColumn1).ToString();

                e.Merge   = strRoomType1 == strRoomType2;
                e.Handled = true;
            }
        }
Пример #13
0
        private void gvwBase_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            if (e.Column.FieldName == "LINE_NAME")
            {
                string line1 = gvwBase.GetRowCellDisplayText(e.RowHandle1, "LINE_NAME").Trim();
                string line2 = gvwBase.GetRowCellDisplayText(e.RowHandle2, "LINE_NAME").Trim();

                if (line1 == line2)
                {
                    e.Merge = true;
                }
                else
                {
                    e.Merge = false;
                }
            }

            if (e.Column.FieldName == "MLINE_CD")
            {
                string Mline1 = gvwBase.GetRowCellDisplayText(e.RowHandle1, "MLINE_CD").Trim();
                string Mline2 = gvwBase.GetRowCellDisplayText(e.RowHandle2, "MLINE_CD").Trim();

                string line1 = gvwBase.GetRowCellDisplayText(e.RowHandle1, "LINE_NAME").Trim();
                string line2 = gvwBase.GetRowCellDisplayText(e.RowHandle2, "LINE_NAME").Trim();
                if (Mline1 == Mline2 && line1 == line2)
                {
                    e.Merge = true;
                }
                else
                {
                    e.Merge = false;
                }
            }
            if (e.Column.FieldName == "MODEL_NAME")
            {
                string Mline1 = gvwBase.GetRowCellDisplayText(e.RowHandle1, "MLINE_CD").Trim();
                string Mline2 = gvwBase.GetRowCellDisplayText(e.RowHandle2, "MLINE_CD").Trim();

                string line1 = gvwBase.GetRowCellDisplayText(e.RowHandle1, "LINE_NAME").Trim();
                string line2 = gvwBase.GetRowCellDisplayText(e.RowHandle2, "LINE_NAME").Trim();

                string style_nm1 = gvwBase.GetRowCellDisplayText(e.RowHandle1, "MODEL_NAME").Trim();
                string style_nm2 = gvwBase.GetRowCellDisplayText(e.RowHandle2, "MODEL_NAME").Trim();

                if (Mline1 == Mline2 && line1 == line2 && style_nm1 == style_nm2)
                {
                    e.Merge = true;
                }
                else
                {
                    e.Merge = false;
                }
            }
        }
        private void gvData_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            int    row1   = e.RowHandle1;
            int    row2   = e.RowHandle2;
            string value1 = gvData.GetDataRow(row1)["Id"].ToString();
            string value2 = gvData.GetDataRow(row2)["Id"].ToString();

            if (value1 != value2)
            {
                e.Handled = true;
            }
        }
Пример #15
0
        //Cell Merge
        private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            int    rowOne   = e.RowHandle1;
            int    rowTwo   = e.RowHandle2;
            string valueOne = gridView1.GetDataRow(rowOne) ["STD002"].ToString( );
            string valueTwo = gridView1.GetDataRow(rowTwo) ["STD002"].ToString( );

            if (valueOne != valueTwo)
            {
                e.Handled = true;
            }
        }
Пример #16
0
        //void frmTestXtraGridGroup_BeforeContextMenuClick(object sender, MB.XWinLib.XtraGrid.GridControlExMenuEventArg arg)
        //{
        //    if(arg.MenuType== MB.XWinLib.XtraGrid.XtraContextMenuType.
        //}

        void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            if (e.Column.FieldName.Equals("Name"))
            {
                e.Merge = object.Equals(e.CellValue1, e.CellValue2);
            }
            else
            {
                e.Merge = false;
            }
            e.Handled = true;
        }
Пример #17
0
 private void gridView2_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     try
     {
         if ((this.gridView2.GetDataRow(e.RowHandle1)["物料编码"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["物料编码"].ToString()) ||
             (this.gridView2.GetDataRow(e.RowHandle1)["自定义物料"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["自定义物料"].ToString())
             )
         {
             e.Handled = true;
         }
     }
     catch { }
 }
Пример #18
0
        private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            if (fields.Exists(x => x.Equals(e.Column.FieldName.ToString())))
            {
                var dr1 = gridView1.GetDataRow(e.RowHandle1);
                var dr2 = gridView1.GetDataRow(e.RowHandle2);

                e.Merge = dr1[e.Column.FieldName].ToString().Equals(dr2[e.Column.FieldName].ToString());
            }
            else
            {
                e.Merge = false;
            }

            e.Handled = true;
        }
Пример #19
0
 private void gv_Detail_tb_PODetail_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if (e.Column.FieldName == tb_PODetail.CategoryID || e.Column.FieldName == tb_PODetail.Color)
     {
         if (e.RowHandle1 >= 0 && e.RowHandle2 >= 0)
         {
             string ItemName1 = gv_Detail_tb_PODetail.GetDataRow(e.RowHandle1)[tb_PODetail.ItemName] + "";
             string ItemName2 = gv_Detail_tb_PODetail.GetDataRow(e.RowHandle2)[tb_PODetail.ItemName] + "";
             if (ItemName1 != ItemName2)
             {
                 e.Merge   = false;
                 e.Handled = true;
             }
         }
     }
 }
Пример #20
0
 /// <summary>
 /// 合并行,第6列以后进行行合并操作,并且已5行为基数进行合并
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void bandedGridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if (e.Column.ColumnHandle < 5)
     {
         if (e.RowHandle2 != 5)
         {
             e.Merge = true;
         }
         e.Handled = true;
     }
     else
     {
         e.Merge   = false;
         e.Handled = true;
     }
 }
Пример #21
0
        private void gridDetailView_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            if (e.Column == colStore || e.Column == Packs)
            {
                return;
            }

            e.Merge = (gridDetailView.GetRowCellValue(e.RowHandle1, colStockCode).ToString().Equals(gridDetailView.GetRowCellValue(e.RowHandle2, colStockCode).ToString()) &&
                       gridDetailView.GetRowCellValue(e.RowHandle1, colItemName).ToString().Equals(gridDetailView.GetRowCellValue(e.RowHandle2, colItemName).ToString()) &&
                       gridDetailView.GetRowCellValue(e.RowHandle1, colUnit).ToString().Equals(gridDetailView.GetRowCellValue(e.RowHandle2, colUnit).ToString()) &&
                       gridDetailView.GetRowCellValue(e.RowHandle1, colManufacturer).ToString().Equals(gridDetailView.GetRowCellValue(e.RowHandle2, colManufacturer).ToString()) &&
                       gridDetailView.GetRowCellValue(e.RowHandle1, colBatch).ToString().Equals(gridDetailView.GetRowCellValue(e.RowHandle2, colBatch).ToString()) &&
                       gridDetailView.GetRowCellValue(e.RowHandle1, colExpiryDate).ToString().Equals(gridDetailView.GetRowCellValue(e.RowHandle2, colExpiryDate).ToString()));

            e.Handled = true;
        }
Пример #22
0
        private void gridView2_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            if (this.gridView2.GetDataRow(e.RowHandle1)["FileID"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["FileID"].ToString()
                ||
                this.gridView2.GetDataRow(e.RowHandle1)["FileName"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["FileName"].ToString()
                ||
                this.gridView2.GetDataRow(e.RowHandle1)["FileTypeName"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["FileTypeName"].ToString()
                ||
                this.gridView2.GetDataRow(e.RowHandle1)["VersionID"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["VersionID"].ToString()
                ||
                this.gridView2.GetDataRow(e.RowHandle1)["ProductName"].ToString() != this.gridView2.GetDataRow(e.RowHandle2)["ProductName"].ToString()

                )
            {
                e.Handled = true;
            }
        }
Пример #23
0
 private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if (e.Column.FieldName == "FIELDNAME" || e.Column.FieldName == "TOTALNUMBER")
     {
         DataRow dr1 = this.gridView1.GetDataRow(e.RowHandle1);
         DataRow dr2 = this.gridView1.GetDataRow(e.RowHandle2);
         if (dr1["PIPENODETYPE"].ToString() == dr2["PIPENODETYPE"].ToString())
         {
             e.Merge = true;
         }
         else
         {
             e.Merge = false;
         }
         e.Handled = true;
     }
 }
Пример #24
0
        void gvEdit_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            var first  = gvEdit.GetRowCellValue(e.RowHandle1, e.Column);
            var second = gvEdit.GetRowCellValue(e.RowHandle2, e.Column);

            if (first != null)
            {
                e.Merge = first.Equals(second) && e.Column.Name == "Zs";
            }
            if (!e.Merge)
            {
                //var firstColVal1 = gvEdit.GetRowCellValue(e.RowHandle1, "Zs");
                //var firstColVal2 = gvEdit.GetRowCellValue(e.RowHandle2, "Zs");
                //e.Merge = firstColVal1.Equals(firstColVal2) && (first == DBNull.Value || second == DBNull.Value);
            }
            e.Handled = true;
        }
Пример #25
0
        void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            if (e.Column.AbsoluteIndex < 0 || e.Column.AbsoluteIndex >= _merge_flag.Length)
            {
                return;
            }

            if (_merge_flag[e.Column.AbsoluteIndex] == 1)
            {
                object value1 = gridView1.GetRowCellValue(e.RowHandle1, e.Column);
                object value2 = gridView1.GetRowCellValue(e.RowHandle2, e.Column);
                if (value1.Equals(value2))
                {
                    e.Merge   = true;
                    e.Handled = true;
                }
            }
        }
Пример #26
0
        public void cell_merge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView gridView = sender as DevExpress.XtraGrid.Views.Grid.GridView;
            object val1 = gridView.GetRowCellValue(e.RowHandle1, e.Column);
            object val2 = gridView.GetRowCellValue(e.RowHandle2, e.Column);

            if (e.Column.FieldName == "image")
            {
                Image img1 = (Image)val1;
                Image img2 = (Image)val2;
                e.Merge = img1.Tag.Equals(img2.Tag);
            }
            else
            {
                e.Merge = val1.Equals(val2);
            }
            e.Handled = true;
        }
Пример #27
0
 /// <summary>
 /// 合并单元格
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CafcbandedGridView_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     //int row1 = e.RowHandle1;
     //int row2 = e.RowHandle2;
     //string value1 = this.CafcbandedGridView.GetDataRow(row1)["TYMC"].ToString();
     //string value2 = this.CafcbandedGridView.GetDataRow(row2)["TYMC"].ToString();
     //if (e.Column.FieldName == "HJ")
     //{
     //    if (value1 != value2)
     //    {
     //        e.Handled = true;
     //    }
     //}
     //else
     //{
     //    e.Merge = false;
     //    e.Handled = true;
     //}
 }
Пример #28
0
 private void grvExecuteTeamAlter_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     if (e.Column == gcShopName)
     {
         if (e.CellValue1 == e.CellValue2)
         {
             //e.Handled = true;
             e.Merge = true;
         }
     }
     else if (e.Column == gcReCheckComplete)
     {
         if (grvExecuteTeamAlter.GetRowCellValue(e.RowHandle1, gcShopCode).ToString() == grvExecuteTeamAlter.GetRowCellValue(e.RowHandle2, gcShopCode).ToString())
         {
             e.Handled = true;
             e.Merge   = true;
         }
     }
     else
     {
         e.Merge = false;
     }
 }
Пример #29
0
 private void gridView1_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
 {
     try
     {
         if (e.Column.FieldName == "FIELDNAME" || e.Column.FieldName == "TOTALLENGTH")
         {
             DataRow dr1 = this.gridView1.GetDataRow(e.RowHandle1);
             DataRow dr2 = this.gridView1.GetDataRow(e.RowHandle2);
             if (dr1["PIPELINETYPE"] == dr2["PIPELINETYPE"])
             {
                 e.Merge = true;
             }
             else
             {
                 e.Merge = false;
             }
             e.Handled = true;
         }
     }
     catch
     {
     }
 }
        void myGridView_CellMerge(object sender, DevExpress.XtraGrid.Views.Grid.CellMergeEventArgs e)
        {
            if (!mergeFieldNameList.Contains(e.Column.FieldName))
            {
                //不需要合并的单元格不合并
                e.Merge   = false; //值相同的2个单元格是否要合并在一起
                e.Handled = true;  //合并单元格是否已经处理过,无需再次进行省缺处理
            }
            else
            {
                //对需要合并的单元格进行检测
                if (string.IsNullOrEmpty(primaryIdField))
                {
                    //没有指定ID字段,按默认流程处理
                    e.Merge   = false; //值相同的2个单元格是否要合并在一起
                    e.Handled = true;  //合并单元格是否已经处理过,无需再次进行省缺处理
                }
                else
                {
                    //判断是否允许合并
                    object objValue1 = myGridView.GetRowCellValue(e.RowHandle1, primaryIdField);
                    object objValue2 = myGridView.GetRowCellValue(e.RowHandle2, primaryIdField);

                    if (objValue1 == objValue2)
                    {
                        //可以合并
                        return;
                    }
                    else
                    {
                        //不是一个项目,取消合并
                        e.Merge   = false; //值相同的2个单元格是否要合并在一起
                        e.Handled = true;  //合并单元格是否已经处理过,无需再次进行省缺处理
                    }
                }
            }
        }