function TForm15.CreateBand(View: TcxGridDBBandedTableView;
BandCaption, ParentBandCaption: String): TcxGridBand; var band: TcxGridBand; begin Result := nil; if View = nil then exit; if ParentBandCaption <> '' then band := FMyList.Objects[FMyList.IndexOf(ParentBandCaption)] as TcxGridBand; Result := view.Bands.Add; with Result do begin Caption := BandCaption; if (BandCaption <> '') and (ParentBandCaption <> '') and (BandCaption <> ParentBandCaption) then begin Position.ColIndex := band.ColumnCount + 1; Position.BandIndex := band.Index; end else if (BandCaption = '') and (ParentBandCaption = '') then begin Position.ColIndex := FRootBandCount + 1; Position.BandIndex := -1; FMyBand := Result; end else begin Position.ColIndex := FRootBandCount + 1; Position.BandIndex := -1; end; end; end; function TForm15.CreateCol(View: TcxGridDBBandedTableView; FieldName: string;
BandCaption: string): TcxGridDBBandedColumn; var band: TcxGridBand; begin result := nil; if View = nil then Exit; if FieldName = '' then exit; if BandCaption = '' then Exit; band := FMyList.Objects[FMyList.IndexOf(BandCaption)] as TcxGridBand; Result := View.CreateColumn; with Result do begin DataBinding.FieldName := FieldName; Position.ColIndex := band.ColumnCount + 1; Position.BandIndex := band.Index; end; end; |
相关文章
- layui table动态表头
- MyBatis动态sql查询及多参数查询
- easyExcel动态表头、动态行数生成、实时生成头写入、把list里的值分别写到1行的多列上
- 导出excel【动态表头,多个sheet】
- vue动态table 动态表头数据+动态列表数据
- C# MongoDB多条件查询,多集合查询示例。动态过滤方法使用。BsonDocument转成普通的实体对象
- 第七章续版,mapper.xml,这是重点,一对多,一对一,动态SQL,foreach...
- 专题二十_动态规划_简单多状态dp问题_买卖股票系列问题_算法专题详细总结
- 【.Net/C#之ChatGPT开发系列】四、ChatGPT多KEY动态轮询,自动删除无效KEY
- uniapp 表格,动态表头表格封装渲染