1) View.DataController.DataModeController.GridMode = False时 RecIdx := View.Controller.SelectedRecords[i].RecordIndex; ColIdx := View.DataController.GetItemByFieldName(AFieldName).Index; OutputVal := View.DataController.Values[RecIdx, ColIdx]; //RecID := View.DataController.GetRecordId(RecIdx); //OutputVal := ADataSet.Lookup(View.DataController.KeyFieldNames, RecID, AFieldName); 2) View.DataController.DataModeController.GridMode = True时 Bkm := View.DataController.GetSelectedBookmark(ASelectedRecordIndex); if ADataSet.BookmarkValid(TBookmark(Bkm)) then begin ADataSet.Bookmark := TBookmark(Bkm); OutputVal := ADataSet.FieldByName(AFieldName).Value; end; View.BeginUpdate; View.DataController.BeginLocate; try // make changes here… finally View.DataController.EndLocate; View.EndUpdate; end;