Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System;
using PX.Data;
namespace Test
{
public class TwoGrids : PXGraph<TwoGrids, TwoGrids.MasterTable>
{
public PXFilter<MasterTable> MasterView;
public PXFilter<DetailsTableA> DetailsViewA;
public PXFilter<DetailsTableB> DetailsViewB;
public void MasterTable_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
MasterTable row = (MasterTable)e.Row;
bool val = row == null || row.Status == "A";
DetailsViewA.Cache.AllowSelect = val;
DetailsViewB.Cache.AllowSelect = !val;
}
[Serializable]
public class MasterTable : IBqlTable
{
#region Status
public abstract class status : IBqlField { }
public const string ApprovedStatus = "A";
public const string HoldStatus = "H";
[PXDBString(1)]
[PXDefault("H")]
[PXStringList(new[] { HoldStatus, ApprovedStatus }, new[] { "On Hold", "Approved" })]
[PXUIField(DisplayName = "Status")]
public virtual String Status { get; set; }
#endregion
}
[Serializable]
public class DetailsTableA : IBqlTable
{
#region Status
public abstract class fieldA: IBqlField { }
[PXDBString(1)]
[PXUIField(DisplayName = "Field A")]
public virtual String FieldA { get; set; }
#endregion
}
[Serializable]
public class DetailsTableB : IBqlTable
{
#region Status
public abstract class fieldB: IBqlField { }
[PXDBString(1)]
[PXUIField(DisplayName = "Field B")]
public virtual String FieldB { get; set; }
#endregion
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.