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