【问题标题】:LiveBindings, alter data at runtimeLiveBindings,在运行时更改数据
【发布时间】:2015-08-19 13:26:42
【问题描述】:

我正在与流动作斗争。 我正在尝试将 liveBindings 与我自己的课程一起使用。

所以我写了:

procedure TFormSearchOfferte.absSearchCreateAdapter(Sender: TObject;
  var ABindSourceAdapter: TBindSourceAdapter);
begin
  myOfferteList := GetListOfOffertes(cbOpenstaand.Checked);
  ABindSourceAdapter := TListBindSourceAdapter<tOfferte>.Create(self, myOfferteList);
end;

procedure TFormSearchOfferte.cbOpenstaandClick(Sender: TObject);
  var ABindSourceAdapter: TBindSourceAdapter;
begin
  ABindSourceAdapter := TListBindSourceAdapter<tOfferte>.Create(self, nil);
  absSearchCreateAdapter(self.parent, aBindSourceAdapter);
  strgrdList.Refresh;
end;

我的 stringrid (strgrdList) 正在显示要约列表。 如果我取消选中我的组合框,他会重新加载我的数据。 MyOfferteList 包含新数据。但我的字符串网格不是。 stringgrid 与 absSearch 相连。

我的 stringgrid 仍然显示旧数据。

我错过了什么?

【问题讨论】:

    标签: delphi livebindings


    【解决方案1】:

    重新加载数据后调用absSearch.Refresh

    【讨论】:

      【解决方案2】:

      认为这应该是absSearch.InternalAdapter.Refresh

      【讨论】:

        猜你喜欢
        • 2020-08-19
        • 1970-01-01
        • 1970-01-01
        • 2018-10-02
        • 2017-05-26
        • 2016-09-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多