0

Im struggling with the flowing. I'm trying to use liveBindings with my own classes.

So i wrote:

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;

My stringrid (strgrdList) is showing a list of offertes. If i uncheck my combobox, he reloads my data. MyOfferteList contains the new data. But my stringgrid isn't. the stringgrid is connected with absSearch.

My stringgrid still shows the old data.

What am I missing?

Mistalis
  • 17,793
  • 13
  • 73
  • 97

2 Answers2

0

Call absSearch.Refresh after reloading data.

coderboy
  • 148
  • 6
0

Think this should be absSearch.InternalAdapter.Refresh

Bimmer
  • 46
  • 4