This commit is contained in:
sgwp 2024-08-20 10:08:10 +08:00
parent d91fa7dbc1
commit 55d38ee0aa

View File

@ -2524,15 +2524,8 @@ begin
while not eof do while not eof do
begin begin
//cxgrid.find //cxgrid.find
for i := 0 to cxGrid.ColumnCount - 1 do mcxGridDbColumn1:= cxGrid.GetColumnByFieldName(trim(fieldByName('fieldName').asstring)) ;
begin if (mcxGridDbColumn1 <> nil) and (lowercase(mcxGridDbColumn1.Name)=lowercase(trim(fieldByName('columnName').asstring))) then
if lowercase(cxGrid.Columns[i].Name) = lowercase(trim(fieldByName('columnName').asstring)) then
begin
mcxGridDbColumn1 := cxGrid.Columns[i];
break;
end;
end;
if mcxGridDbColumn1 <> nil then
begin begin
mcxGridDbColumn1.Visible := fieldByName('Visible').AsBoolean; mcxGridDbColumn1.Visible := fieldByName('Visible').AsBoolean;
mcxGridDbColumn1.Width := fieldByName('width').asInteger; mcxGridDbColumn1.Width := fieldByName('width').asInteger;