Esempio n. 1
0
        /// <summary>
        /// Validates and saves the changes the user has made in the field property editor control.
        /// </summary>
        /// <param name="field">The field (column) whose properties are being saved.</param>
        /// <param name="isNewField">true to indicate that the field is being created; false to indicate that an existing field is being modified.</param>
        public void OnSaveChange(SPField field, bool isNewField)
        {
            EnsureChildControls();

            lookupEditor.OnSaveChange(field, isNewField);
            autocompleLookupField = field as AutocompleteLookupField;
            autocompleLookupField.SetFieldAttribute("Filter", filterTextBox.Text);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes the field property editor when the page loads.
        /// </summary>
        /// <param name="field">An object that instantiates a custom field (column) class that derives from the <see cref="T:Microsoft.SharePoint.SPField"/> class.</param>
        public void InitializeWithField(SPField field)
        {
            EnsureChildControls();
            lookupEditor.InitializeWithField(field);
            if (field == null || Page.IsPostBack)
            {
                return;
            }
            autocompleLookupField = field as AutocompleteLookupField;
            filterTextBox.Text    = autocompleLookupField.GetFieldAttribute("Filter");

            var lookupField = field as SPFieldLookup;

            if (lookupField == null)
            {
                return;
            }
        }