tags:

views:

274

answers:

1

When I go to /_layouts/groups.aspx in my site collection, I only see the first 100 groups. There is no pagination control visible. How do I correct this, to work with more than just the first 100 groups?

+1  A: 

That list is a sharepoint internal list which cannot be accessed through the API and must be hit by utilizing the object model.

Assuming you're familiar with the SharePoint API,

You need to access your site programmatically then access the users and groups list, then access the default view on it, and set it's paging property to true.

static void Main(string[] args)
{
         //Access the site
         using (SPSite _site = new SPSite("http://myurlwithport:800"))
         {
            //Substitute the appropriate web if it is not the root
            using (SPWeb _web = _site.RootWeb)
            {
               // This is always the name of the users list
               SPList userList = _web.Lists["User Information List"];

               //This is the view that is causing you trouble
               SPView allGroupsView = userList.Views["All Groups"];

               //Set this value to true if it is false.
               Console.WriteLine(allGroupsView.Paged);

               //Set this value to whatever you want if you don't want paging
               Console.WriteLine(allGroupsView.RowLimit);                   

               Console.ReadLine();
            }
         }
}

Hope this does it for ye.

EDIT

Based on OP comments

There is a RowLimit property that you can change instead if you want.

I've added it into the code provided.

I think it sucks that there is no way to work with more than 100 groups in the GUI.
Nathan DeWitt