天天看點

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;

繼續閱讀