I need to implement AutoComplete feature for People Editor in custom field type derived from SPUserField. To do this, I have to customize both render template and field editor control (and other things).

As MSDN says, SPUSerfField is a field uses field editor control I cannot inherit from, but I need to implement switching from OOB People Editor Control to Custom People Editor.

So far, question is How can I inherit behavior of OOB UserFieldEditor to customize it in my own USerFieldEditorControl or somehow change basic behavior?

2 Answers 2


If you want to just inherit PeopleEditor you can do it, because it is a public class. Pasted from reflector:

[ValidationProperty("CommaSeparatedAccounts"), SharePointPermission(SecurityAction.InheritanceDemand, ObjectModel=true), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal), SharePointPermission(SecurityAction.LinkDemand, ObjectModel=true), AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class PeopleEditor : EntityEditorWithPicker {...}

So CustomPeopleEditor : Microsoft.SharePoint.WebControls.PeopleEditor will work just fine.

But in that linked article i can't find such a statement that you cannot inherit from it.

  • Actually, I was talking about Field Editor Control, not Render Template with PeopleEditor. There is a UserFieldEditor control for customize behavior of SPUserField. I have an idea to add this mysterious UserFieldEditor to CreateChildControls methods of my editor control I specify and add some checkboxes or whatever I need to implement switching controls behaviour.
    – Bassist
    Oct 10, 2011 at 8:06
  • @Bassist But UserFieldEditor is also inheritable (it's public) so why not? And note that you are talking about SPFieldUser no SPUserField :) Oct 10, 2011 at 8:12
  • Also, I doubt I should inherit from PeopleEditor because AutoComplete feature I need to implement (jQuery, for example) surely will require standard controls like textboxes. Moreover, I'll need a custom AD query logic which was implemented in PeopleEditor in horrible way, so I guess I can't use PeopleEditor. :(
    – Bassist
    Oct 10, 2011 at 8:14
  • Sorry, I'm a quite novice in SharePoint, I'm really talking about SPFieldUser :) But MSDN says I cannot inherit UserFieldEditor which is editor control for SPFieldUser. This is what I'm talking about: Your field editor control class cannot inherit from either the LookupFieldEditor or the UserFieldEditor control classes, which are the only two field editor controls that ship with SharePoint Foundation. They are not accessible from your code.
    – Bassist
    Oct 10, 2011 at 8:16

If someone needs, here is a way to implement this feature. While we cannot declaratively use UserFieldEditor Control in our CustomFieldEditor, we still can create it programmatically. To extend UserFieldEditor props, add whatever you need declaratively in your ascx page (InpuFormSection with some RadioButs in my case) and in your code-behind make this(Don't forget implement IFieldEditor interface):

protected UserFieldEditor Editor;

bool IFieldEditor.DisplayAsNewSection
        get { return false; }

protected override void OnInit(EventArgs e)

        Editor = (UserFieldEditor) Page.LoadControl("/_controltemplates/UserFieldEditor.ascx");

void IFieldEditor.InitializeWithField(SPField field)
        if (IsPostBack) return;
        Field = (MSTeamUserField) field;

    void IFieldEditor.OnSaveChange(SPField field, bool isNewField)

        Field = (MSTeamUserField) field; // your custom field
        // apply your custom settings here
        Editor.OnSaveChange(field, isNewField); //Invoke UserFieldEditor OnSaveChange method 

That's it! now you have your extended UserFieldEditorControl with all built-in settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.