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
begin
//cxgrid.find
for i := 0 to cxGrid.ColumnCount - 1 do
begin
if lowercase(cxGrid.Columns[i].Name) = lowercase(trim(fieldByName('columnName').asstring)) then
begin
mcxGridDbColumn1 := cxGrid.Columns[i];
break;
end;
end;
if mcxGridDbColumn1 <> nil then
mcxGridDbColumn1:= cxGrid.GetColumnByFieldName(trim(fieldByName('fieldName').asstring)) ;
if (mcxGridDbColumn1 <> nil) and (lowercase(mcxGridDbColumn1.Name)=lowercase(trim(fieldByName('columnName').asstring))) then
begin
mcxGridDbColumn1.Visible := fieldByName('Visible').AsBoolean;
mcxGridDbColumn1.Width := fieldByName('width').asInteger;