Custom Filter for multiple joined Grids

Hi All,

Here is the situation: on a form there are two grids. The first grid contains customers(account numbers, their names and other information) - datasources custTable and dirPartyTable. And the second grid contains information about sales orders (SalesTable datasource). The information in two grids is joined (when you select a customer in the first grid, you will see all sales orders related to him).

The question is about making a custom filter. There is a custom filter “Delivery date” for the second grid. When you select a date in it, the records in the 2nd grid are filtered and !in the 1st grid customers should also be filtered. For example, when we select date ‘11/11/2012’ in the filter, in the 2nd grid we see only sales orders with delivery date “11/11/2012” and in the first grid we should see only those customers that have sales orders with this delivery date.

How to make such filter with delivery date?