From 55d38ee0aa31863773cd844a88e1ce2ad9d7d9f3 Mon Sep 17 00:00:00 2001 From: sgwp <63001967@qq.com> Date: Tue, 20 Aug 2024 10:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public10/ThreeFun/Fun/U_RTFun.pas | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/public10/ThreeFun/Fun/U_RTFun.pas b/public10/ThreeFun/Fun/U_RTFun.pas index 0a76b36..797e7b3 100644 --- a/public10/ThreeFun/Fun/U_RTFun.pas +++ b/public10/ThreeFun/Fun/U_RTFun.pas @@ -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;