Topic: Grids in version 2.3

Hi Dmitry,

I was very enthusiastic to discover the auto-refresh of a grid without the need of a script when adding of updating a record but actually, when you add a second grid on the same form, the second grid does not refresh.

Is there a trick or property to check?

Re: Grids in version 2.3

Hello,


I checked that, but can't repeat this bug.
Can you make an example project with this bug.


Thank you.

Dmitry.

Re: Grids in version 2.3

Hi Dmitry,

I have made a very simple example for you. I am using triggers for the audit trails to avoid too much scripting and you can see them using SQLite Studio.

In short, when you enter or modify an entry in grid1 (left) the display is automatically updated whereas the grid2 on the right is not. If I want grid2 to update I have to trigger the dbupdate via script... sad

Post's attachments

Attachment icon Demo_grids.zip 5.92 kb, 449 downloads since 2016-02-24 

Re: Grids in version 2.3

You should create this event

procedure Input_Button1_OnAfterClick (Sender: string);
begin
    Form1.TableGrid2.dbUpdate;
end;

TableGrid2 will not update automatically,  because you added record to table "Users", but in the TableGrid2 show records from table "Logs", My Visual Database can't to know that you have added some records to the table "Logs" using Triggers or script, you should update TableGrid2 using script.

Dmitry.

Re: Grids in version 2.3

Ok, so MVDB triggers the updatedb only when interacting directly with the UI, good to know. I already implemented the refresh via script.