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;