cxgrid 单元格合并

来源:互联网 发布:js table 添加tr td 编辑:程序博客网 时间:2024/06/06 19:16

  1)cxGridDBTableViewColumn1.Options.CellMerging:=true
  2)编写代码
procedure TfrmYFCOPR01A.cxGrid1DBBandedTableView1PAB01CompareRowValuesForCellMerging(
  Sender: TcxGridColumn; ARow1: TcxGridDataRow;
  AProperties1: TcxCustomEditProperties; const AValue1: Variant;
  ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
  const AValue2: Variant; var AAreEqual: Boolean);
begin
  inherited;
  if (ARow1.Values[0] = ARow2.Values[0]) AND (ARow1.Values[1] = ARow2.Values[1]) then
    AAreEqual := True
  else
  AAreEqual := False;
end;
原创粉丝点击