Hi Everyone
I am facing one problem, After update the data view Records in RowSelected event, in that data view new records affected. But, in grid displaying old values.
Can you help me please…?
In the bellow am adding my graph functionality.
In This Grid Showing only Opportunity Records.
Data View:-
public SelectFrom<SSPAgreement>.OrderBy<SSPAgreement.active.Desc, SSPAgreement.agreeDate.Asc,
SSPAgreement.agreeNbr.Asc>.View Agreements;
Event Handler:-
protected virtual void CROpportunity_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
CROpportunity row = (CROpportunity)e.Row;
if (row == null) return;
var sPSetup = AutoNumSetup.Current;
Agreements.Cache.AllowSelect = sPSetup.EnableOpp == true;
Agreements.View.Cache.Clear();
Agreements.View.Cache.ClearQueryCache();
var AgreementList = PXSelect<SSPAgreement,
Where<SSPAgreement.agreeType, In<Required<SSPAgreement.agreeType>>>>.
Select(Base, "Opp");
if (AgreementList != null)
{
foreach (SSPAgreement item in AgreementList)
{
SSPAgreement Agreement = new SSPAgreement();
Agreement.AgreeNbr = item.AgreeNbr;
Agreement.AgreeType = item.AgreeType;
Agreement.AgreeDate = item.AgreeDate;
Agreement.Descr = item.Descr;
Agreement.Revision = item.Revision;
Agreement.Active = item.Active;
Agreement.TemplateCode = item.TemplateCode;
Agreements.Cache.Update(Agreement);
}
}
Agreements.View.RequestRefresh();
}