public static FormField GetFormField(this ListFieldIterator listFieldITerator, List <FormField> formFields, SPField field) { FormField ff = (from form in formFields where form.Field.Equals(field) select form).FirstOrDefault(); return(ff); }
public static List <FormField> GetFormField(this ListFieldIterator listFieldITerator, List <FormField> formFields, Type fieldType) { List <FormField> fields = (from form in formFields where form.Field.GetType().Equals(fieldType) select form).ToList <FormField>(); return(fields); }
public static List <FormField> GetFormFields(this ListFieldIterator listFieldIterator) { if (listFieldIterator == null) { return(null); } return(FindFieldFormControls(listFieldIterator)); }
public static FormField GetFormField(this ListFieldIterator listFieldIterator, List <FormField> formFields, string fieldName) { FormField formField = (from form in formFields where form.FieldName.Equals(fieldName, StringComparison.InvariantCultureIgnoreCase) select form).FirstOrDefault(); if (formField == null) { throw new Exception("Could not find form field: " + fieldName); } return(formField); }
public static FormField GetFormField(this ListFieldIterator listFieldIterator, string fieldName) { return(GetFormField(listFieldIterator, GetFormFields(listFieldIterator), fieldName)); }
public static List <FormField> GetFormFieldByType(this ListFieldIterator listFieldIterator, Type fieldType) { return(GetFormField(listFieldIterator, GetFormFields(listFieldIterator), fieldType)); }
public static FormField GetFormFieldByField(this ListFieldIterator listFieldIterator, SPField field) { return(GetFormField(listFieldIterator, GetFormFields(listFieldIterator), field)); }
protected virtual bool IsFieldExcluded(SPControlMode controlMode, SPField field) { var fieldIterator = new ListFieldIterator(); fieldIterator.ControlMode = controlMode; MethodInfo IsFieldExcluded = typeof(ListFieldIterator).GetMethod("IsFieldExcluded", BindingFlags.NonPublic | BindingFlags.Instance); return (bool)IsFieldExcluded.Invoke(fieldIterator, new object[] { field }); }