A
A
Alexey Ovsyankin2018-04-16 15:38:23
Delphi
Alexey Ovsyankin, 2018-04-16 15:38:23

How to implement data output to two dbgrids by Id?

They say that it is possible through Afterscroll, but did not understand how. Yes, I couldn't find anything. Or maybe some parametric query, maybe there are other options. Tell me please.5ad4990807c85950154019.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kalapanga, 2018-04-16
@kalapanga

I will explain as I understand it:
The first table displays the data of the ADOQuery1 query, which has the id_realiz field.
The data of the ADOQuery2 query, which also has the id_realiz field, is displayed in the second table.
You want the second table to display only those records whose id_realiz field value matches the id_realiz field value of the selected row of the first table.
So?
If so, then this is the usual master - detail, and you googled something wrong. It is necessary:
​​1) ADOQuery2 query to add the id_realiz = :id_realiz condition to the where conditions
2) ADOQuery2 query to set the DataSource property equal to DataSource1
Everything. If you meant something else, please try again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question