var
i: integer;
begin
for i := 0 to DBgridEh1.columns.count - 1 do
begin
if DBgridEh1.columns[i].FieldName = '你想要的' then
DBgridEh1.columns[i].Visible := True;
end;
DBgridEh1.FieldColumns['字段名A'].Visible:=true;
DBgridEh1.FieldColumns['字段名B'].Visible:=false;
DBgridEh1.FieldColumns['name'].Visible:=false;