0

我有一个使用 LiveBindings 绑定到 TListView 的对象列表

然后我在列表中有一个用于编辑对象的表单。这很好用

这是我创建适配器事件的来源

procedure TFormMain.PrototypeBindSource1CreateAdapter(Sender: TObject; var ABindSourceAdapter: TBindSourceAdapter);
begin
  FreeAndNil(FContainer);
  FPersons := NewRequest('https://localhost:44303/Contact').ObjectContainer(FContainer).BasicAuthenticator('test', 'test').GET.AsType<TPersons>;
  ABindSourceAdapter := TListBindSourceAdapter<TPersonDTO>.Create(Self, FPersons.Items, False);
  AdapterBindSource1.Adapter := ABindSourceAdapter;
  PrototypeBindSource1.Active := True;
end;

当我关闭我的编辑器表单时,我希望新数据立即在屏幕上可见

我试过刷新我的TPrototypeBindSource

  PrototypeBindSource1.Active := False;
  PrototypeBindSource1.Active := True;

但这给了我一个AV。

简而言之,我如何用新数据刷新屏幕?

4

0 回答 0