Skip to main content
Solved

load data in datagrid depending of a selector

  • November 26, 2021
  • 9 replies
  • 190 views

Hi good night.

 

I have a problem when i try to “load” data of a selector grid depending of a selector header.

 

When i select the value 21-0049 in the selector, the selector in the grid is empty (Id PhaseCode). The correct operation is: when i select the 21-0049 (in the selector) the selector of the grid (IdPhaseCode) should load the data  related to this Nbr (21-0049)

 

My IdPhaseCode DAC is:

    #region IdPhaseCode
    [PXDBInt()]
    [PXSelector(typeof(Search<CEEstimateEstimate.idPhaseCode , Where<CEEstimateEstimate.estimateNbr.IsEqual<CEBidPackage.estimateNbr.FromCurrent>>>),
    typeof(CEEstimateEstimate.id),
    typeof(CEEstimateEstimate.idPhaseCode),
    SubstituteKey = typeof(CEEstimateEstimate.description))]
    [PXUIField(DisplayName = "Id Phase Code")]
    public virtual int? IdPhaseCode { get; set; }
    public abstract class idPhaseCode : PX.Data.BQL.BqlInt.Field<idPhaseCode> { }
    #endregion

 

  • The CEEstimateEstimate DAC contains the selector information
  • The CEBidPackage.estimateNbr.FromCurrent its the value of the current selector (21-0049, but its seems that its not working)

 

Can you helpme please?

 

A lot of thanks.

Best answer by ChandraM

Hi @eddiedaco As the requirement is to populate the value of 1 selector based on the value of another, please find the below Post, for your reference. Hope this helps

https://stackoverflow.com/questions/43921265/update-selector-selection-with-another-selectors-selected-value

Thanks

 

View original
Did this topic help you find an answer to your question?

9 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3393 replies
  • November 26, 2021

Hi @eddiedaco  Is data available related to “21-0049” in this CEEstimateEstimate table?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 693 replies
  • November 26, 2021

Hi @eddiedaco 

Can you change the selector like below and check once?

  [PXSelector(typeof(Search<CEEstimateEstimate.idPhaseCode , Where<CEEstimateEstimate.estimateNbr.Equal<Current<CEBidPackage.estimateNbr>>>>),


  • Author
  • Varsity I
  • 32 replies
  • November 27, 2021
Naveen B wrote:

Hi @eddiedaco  Is data available related to “21-0049” in this CEEstimateEstimate table?

Hi @Naveen B  yes, data is available


  • Author
  • Varsity I
  • 32 replies
  • November 27, 2021
jinin wrote:

Hi @eddiedaco 

Can you change the selector like below and check once?

  [PXSelector(typeof(Search<CEEstimateEstimate.idPhaseCode , Where<CEEstimateEstimate.estimateNbr.Equal<Current<CEBidPackage.estimateNbr>>>>),

Hi @jinin  it didn't work


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3393 replies
  • November 27, 2021

Hi @eddiedaco  There may be chance of getting spaces as suffix for that string just like below, hence it is NOT matching and not filtering the data into the selector. Please find the screenshot for your reference.

 

 


Forum|alt.badge.img+8
  • Semi-Pro I
  • 715 replies
  • Answer
  • November 27, 2021

Hi @eddiedaco As the requirement is to populate the value of 1 selector based on the value of another, please find the below Post, for your reference. Hope this helps

https://stackoverflow.com/questions/43921265/update-selector-selection-with-another-selectors-selected-value

Thanks

 


Forum|alt.badge.img+8
  • Semi-Pro I
  • 715 replies
  • November 27, 2021

Hi @eddiedaco Here is the sample to populate the selector based on another, from the link above. Hope this helps.

[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" />

  • Author
  • Varsity I
  • 32 replies
  • December 4, 2021
Naveen B wrote:

Hi @eddiedaco  There may be chance of getting spaces as suffix for that string just like below, hence it is NOT matching and not filtering the data into the selector. Please find the screenshot for your reference.

 

 

a lot of thanks @Naveen B  ill check it!!!


  • Author
  • Varsity I
  • 32 replies
  • December 4, 2021
ChandrasekharM wrote:

Hi @eddiedaco As the requirement is to populate the value of 1 selector based on the value of another, please find the below Post, for your reference. Hope this helps

https://stackoverflow.com/questions/43921265/update-selector-selection-with-another-selectors-selected-value

Thanks

 

thanks! @ChandrasekharM  ill check it!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings