MOSS All groups do not show pagination when more than 100 groups are returned

When I go to /_layouts/groups.aspx

within my site collection, I only see the first 100 groups. Apparently there is no pagination control. How do I fix this to work with over 100 groups?

0


a source to share


3 answers


You can also change this view through the standard interface rather than using code if you need:



  • Navigate to "http: // <site collection url / _ directories / users / AllGroups.aspx"
  • Site Actions-> Edit Page
  • Modify List View Web Part
  • In the selected window, click the "Change current view" link.
  • You can now edit view settings like any other in SharePoint.
+4


a source


This list is an internal list of shared volumes that cannot be accessed through the API and must be used using the object model.

Assuming you are familiar with the SharePoint API,

You need to access your site programmatically then go to the list of users and groups, then browse the default view and set its 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 you.



EDIT

Based on OP's comments

There is a RowLimit property that you can change if you like.

I added it to the provided code.

+1


a source


I want to share some additional clarification with Michael M's suggestion to update "AllGroups.aspx".

Initially, I used a regular site collection administrator account to access "http: ///_catalogs/users/AllGroups.asp" and got access.

Then I used a different site collection administrator account that was also in the Windows administration group for the SP server and was still able to access it.

Finally, I used the SharePoint 2010 farm administrator account that we used to configure the web application / application pool, and finally gave me access to the page.

+1


a source







All Articles