Hi
My User Profiles have around 10,000 records.
I want to display them in a SharePoint Grid ( custom) . If the count of profile were only 50 , to display them all my dev machine takes around 40 seconds with all custom processing I have.
So, I want page size say 20 , and on each next click I should get from profile DB next 20 records. I should be able to get page numbers also in the bottom. For direct navigation.
Please suggest if you have something in your mind / you done it already in past.
I am gonn rely on Microsoft.Office.Server.UserProfiles.ProfileManagerBase.GetEnumerator for this .
Any pointer ?
Reply 1
Hi hemantrhtk,
It may be not easy to use paging to user profiles, in this situation, you may consider store the profile information in a datatable, and use paging for the datatable, here is an example about this, please refer to this for more information:
http://www.codeproject.com/Articles/14017/using-cache-to-store-Data-in-datatable-for-custom
Thanks,
Qiao Wei
Reply 2
with http://msdn.microsoft.com/en-us/library/ee581591.aspx under microsoft.Office.Server.UserProfiles
we can atleast implement next,previous under pagination. But looking for page numbers with last and 1st page buttons.
Anyways we are targeting membership provider as base for pagination, which has public abstract MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords);. after that for each page fetch the records from User profiles.
No comments:
Post a Comment