Microsoft_MVP_banner

Hide Fields in a AxGroup /AxForm in Enterprise portal

There was a requirement to hide/un-hide the fields within AXGroup according to the setup defined in AX form either to show fields or not as per user.

protected void
AxFrmEmployee_PreRender(object sender, EventArgs e)
{
    AxForm frm = this.axFrmEmployee;
   
    for (int i = 0; i <
this.AxGroup1.Fields.Count; i++)
    {
        AxBoundField fld =
this.AxGroup1.Fields[i] as AxBoundField;
        if ((fld != null) &&
(fld.Metadata.Name == “TitleId”))
        {
            fld.Visible = (frm.CurrentMode ==
DetailsViewMode.ReadOnly) ? false : true;
        }
    }
}

Share:

Send Us A Message

Leave a Reply

Your email address will not be published. Required fields are marked *

FaisalFareed@2025. All rights reserved

Design by T3chDesigns