Created
December 26, 2017 06:40
-
-
Save smarenich/a1b9ea1776eb65e083a51a26b805608d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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