cxgrid合并值相同的某列
设置cxGrid的某列的CellMerging属性可使这一列相同值的单元格合并。
1)cxGridDBTableViewColumn1.Options.CellMerging:=true
2)编写代码
procedureTfrmYFCOPR01A.cxGrid1DBBandedTableView1PAB01CompareRowValuesForCellMerging(
Sender:TcxGridColumn;ARow1:TcxGridDataRow;
AProperties1:TcxCustomEditProperties;constAValue1:Variant;
ARow2:TcxGridDataRow;AProperties2:TcxCustomEditProperties;
constAValue2:Variant;varAAreEqual:Boolean);
begin
inherited;
if(ARow1.Values[0]=ARow2.Values[0])AND(ARow1.Values[1]=ARow2.Values[1])then
AAreEqual:=True
else
AAreEqual:=False;
end;
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。