none
SharePointGroup property on peopleeditor does not work

    Question

  • Hello...I'm having a problem with the People Editor control. I'm using the control in a web part, filtering on a sharepoint group that exists at the subsite level. (i.e., PeopleEditor1.SharePointGroup = groupName;) I filtered the People Editor so that only Users from this group can be selected. When the Browse button is clicked, all works fine. Only users from this group are displayed in the modal form. However, I am still able to type in the People Editor control's textbox, click "CheckNames" and the users will be resolved, even if they're not in the group that is being filtered by the control. In my case, I have been able to confirm domain users as well as top level site users (who are not in the filtered group) will be resolved. Is this a bug in the People Editor control? If so, I don't understand the point of providing a filtering mechanism on the control, when only the browse will function properly. Thanks in advance for any assistance.
    Thursday, March 04, 2010 2:10 AM

All replies

  • You are correct.  The control does not consider the SharePointGroup property when it validates the users that are manually typed in.  If you want this functionality, you will need to create a control that subclasses the PeopleEditor control and override the Validate and ValidateEntity methods.  Otherwise, you could just use javascript to prevent the user from entering text into the textbox but still allow users to be deleted from it.

    --
    Bryan Phillips
    MCT, MCSD, MCDBA, MCSE
    Microsoft MVP - SharePoint Services
    Blog: http://bphillips76.spaces.live.com
    Web Site: http://www.composablesystems.net

    Thursday, April 01, 2010 2:26 AM
  • Try setting ValidatorEnabled to true as well on the people editor control.  Also, set SelectionSet to "User" if you don't want to allow selection of groups.
    Monday, August 16, 2010 10:19 PM