3

When searching through the people picker, results are sorted by their account name and not by their display name.

Is there any way to change this behavior?

1 Answer 1

1

PeopleQueryControl using SPUtility.SortPrincipalInfo() method:

private static IList SortPrincipalInfo(IEnumerable principals)
{
    SortedList list = new SortedList();
    foreach (SPPrincipalInfo info in principals)
    {
        string str = info.LoginName.ToLowerInvariant();
        string key = string.Concat(new object[] { info.DisplayName, " ", str, info.IsSharePointGroup });
        if (!list.ContainsKey(key))
        {
            list.Add(key, info);
        }
    }
    return list.Values;
}

PeoplePicker sorts results by display name. Can you give more information (providers you are using and other)

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.