private void EditForm_ChangeType(ActionType type, Guid actionId) { EditForm.Fields[2].Visible = true; // NavigateUrl EditForm.Fields[3].Visible = true; // OrderNumber EditForm.Fields[4].Visible = true; // AuthenticationRequired CheckBoxField checkBoxField = EditForm.Fields[5] as CheckBoxField; // InstanceRequired if (checkBoxField != null) { checkBoxField.Visible = FrameworkConfiguration.Current.WebApplication.EnableMultipleInstances; } EditForm.Fields[6].Visible = true; // Visible EditForm.Fields[7].Visible = false; // AlternativeParents EditForm_SetSubmenuFieldsVisible(false); EditForm_SetDetailMenuFieldsVisible(false); AlternativeParentsTree.Visible = false; AlternativeParentsTree.DataSource = null; switch (type) { case ActionType.GlobalNavigationLink: EditForm.Fields[5].Visible = false; // InstanceRequired break; case ActionType.Control: EditForm.Fields[2].Visible = false; // NavigateUrl EditForm.Fields[3].Visible = false; // OrderNumber EditForm.Fields[4].Visible = false; // AuthenticationRequired EditForm.Fields[5].Visible = false; // InstanceRequired EditForm.Fields[6].Visible = false; // Visible break; case ActionType.Page: // AlternativeParents m_AlternativeParentActionsIdList = ActionProvider.GetAlternativeParentActionsIdList(actionId); if ((m_AlternativeParentActionsIdList != null) && (m_AlternativeParentActionsIdList.Count > 0)) { EditForm.Fields[7].Visible = true; // AlternativeParents AlternativeParentsTree_DataBind(actionId); } else { EditForm.Fields[7].Visible = false; // AlternativeParents } EditForm_SetSubmenuFieldsVisible(true); EditForm_SetDetailMenuFieldsVisible(true); break; } }