Does anyone have an answer for this behaviour :

Does anyone have an answer for this behaviour :

Grids (and certainly any control) livebinded to details queries (FDQuery) are never "refreshed" after master row has changed. My master query "OnAfterScroll" event contains such code (lfcContacts is my binding from TGrid to TBindSource):

If assigned(frmMain) then
Begin
frmMain.lfcContacts.Active := false;
frmMain.lfcContacts.Active := true;
end;

This is really cumbersome and I never got such refreshing issues with VCL...

I'm doing this wrong ? I'm going to thtow all this FMX stuff away and going back to VCL for win32/win64 and Android Studio....

Ps : all my queries are put on a datamodule
Ps2: Have to do the same trick when calling refresh or refreshrecord...
Ps3: I cannot found any valuable resources (ebooks for example) about FMX...

Comments

  1. Ditch livebindings (:
    Seriously: after all these years, they still have stability issues.

    ReplyDelete
  2. Jeroen Wiert Pluimers Really? The entire feature is that problematic?

    ReplyDelete
  3. Bill Meyer​ ohhh yes... A nightmare. And I don't speak about design time issues (corrupted ".lb" files, fast as a snail designer...).

    ReplyDelete
  4. Same issue with SpinEdit / Combobox control where I need to send a change notification too...

    ReplyDelete
  5. Why would one use live bindings over data-aware controls?

    ReplyDelete
  6. Asbjørn Heid the only problem on the data-aware architecture is that it forces you to use TDataSet. So, you'll always end up into the "database" world even if you just want to display things that only live in runtime. In the end, you're forced to create a memory table like a TClientDataSet, and thats plumbing code

    If only we had to implement IDataSet...

    ReplyDelete
  7. Agustin Ortu Yeah I can see that (and I feel your IDataSet pain). I meant in the context of OP though, where you do have a TDataSet.

    ReplyDelete

Post a Comment