Contributions
Re: Translated the program from Delphi 7 to Delphi Berlin
Version TestComplete 12.31.Our program is configured in accordance with the instructions on TestComplete. How it seems to me a problem in the FieldByName method.Finding values in the grid works fine. The problem is only in the output of the values.1.9KViews0likes3CommentsTranslated the program from Delphi 7 to Delphi Berlin
Hi All, Our team translated the program from Delphi 7 to Delphi Berlin. After that, some of the functions in the TestCompletethat worked on Delphi 7 now do not work.There is a function that searches for a column in the grid, and then remembers the value of the field in that column. function GetGridVal_alt(mgrid: OleVariant; colname: WideString): WideString; var FldName: string; i: integer; GridView, a: OleVariant; begin //для DevExpress if mgrid.WndClass = 'TcxGrid' then begin GridView:= mgrid.Views[0]; for i := 0 to GridView.ColumnCount-1 do // Check the column caption if GridView.Columns[i].Caption = colname then begin FldName:= GridView.Columns[i].DataBinding.FilterFieldName; Result:=GridView.Columns[i].DataBinding.DataController.DataSet.FieldByName(FldName).AsString; Exit; end; end; end; The required column is found by the function.But at the output of the value it stops with an error.This derivation of the value from the grid corresponds to this line: Result:=GridView.Columns[i].DataBinding.DataController.DataSet.FieldByName(FldName).AsString; We need to rewrite it somehow, that she would work for Delphi Berlin. Help me please.Solved2KViews0likes5Comments