天天看点

cxgrid动态创建列

cxgrid动态创建列

procedure TFrmRuleEdit.CreateCols;

var

Column: TcxGridDBColumn;

begin

cdsPowerPrj.First;

while not cdsPowerPrj.Eof do

Column := viewPower.CreateColumn;

Column.Caption := cdsPowerPrj.FieldByName('description').Text;

Column.DataBinding.FieldName := cdsPowerPrj.FieldByName('powerName').Text;

Column.PropertiesClassName := 'TcxCheckBoxProperties';

Column.Width := 50;

继续阅读