Hi All,
In my custom screen has a PXGrid which is empty in the beginning. After I add new record and press the Verify Vendors button (Some validation is added) then another new empty row added to the grid automatically. Can someone help me out to avoid this scenario?
Following is my custom screens and button click event.
- Before the click event

- After the click event
-
Button click event
public PXAction<HMRCVendorRegisterDetail> VerifyVendors;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Verify Vendors", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select, Enabled = false)]
protected virtual IEnumerable verifyVendors(PXAdapter adapter)
{
foreach (HMRCVendorRegisterDetail vendorRegisterDetail in VendorRegisterDetail.Select())
{
if(vendorRegisterDetail.UsrSelect == false)
{
VendorRegisterDetail.Cache.RaiseExceptionHandling<HMRCVendorRegisterDetail.bAccountID>(vendorRegisterDetail, null, new PXSetPropertyException(Messages.VendorEmptyMessage));
}
else
{
//Logic
}
}return adapter.Get();
}