CxGrid按照查询结果自动创建字段

procedure TCFormQuery.sQryAfterOpen(DataSet: TDataSet);
begin
inherited;
with gResultDBTv do
begin
(DataController as IcxCustomGridDataController).DeleteAllItems;
(DataController as IcxCustomGridDataController).CreateAllItems(False);
end;
end;

你可能感兴趣的:(grid)