1
votes

I have two tables: one is a header table, the second its details table. I want to implement a grid containing two selectors. The user will select a header value from the first selector which will cause the second selector to update with the related detail values. What do I need to do to get the second one to update with the proper detail values based on the first selector's selected value?

1

1 Answers

3
votes

You just need to set the selector to use Current and point to the Dac/Field used in your header the same way you do a view in a graph.

[PXSelector(typeof(Search<TableTwo.someOtherField,
    Where<TableTwo.someRelatedField, Equal<Current<HeaderTable.relatedField>>>))]

In your page file on your grid field, you need AutoRefresh set to true.

 <px:PXSelector ID="edAField" runat="server" DataField="AField" AutoRefresh="True" />

If nothing is showing in your selector, make sure the header value is committed before trying to select the value on the grid field.