Thursday, June 19, 2014

If any field is visible in the group, do not hide the group in EP


 bool custVendGroupHideForApprover = true;
if (this.AxGroup_ExpenseHeaderCustomerVendorForApprover.Visible)
        {
            foreach (DataControlField dcf in this.AxGroup_ExpenseHeaderCustomerVendorForApprover.DataControlFieldCollection)
            {
                if (dcf is AxBoundField)
                {
                    // If any field is visible, do not hide the group
                    if (((AxBoundField)dcf).Metadata.Visible)
                    {
                        custVendGroupHideForApprover = false;
                        break;
                    }
                }
            }

            this.AxGroup_ExpenseHeaderCustomerVendorForApprover.Visible = !custVendGroupHideForApprover;
        }

No comments:

Post a Comment