Hi,
I'm trying to change the description of an existing SharePoint group which shouldn't be a really tough job but unfortunately it doesn't work as expected. After running the corresponding method the group's description stays the same as before.
Here is the code I use to change the description:
private void ResetGroupDescription(SPWeb rootWeb, string groupName, string groupDescription)
{
rootWeb.AllowUnsafeUpdates = true;
SPGroup group = rootWeb.SiteGroups[groupName];
group.Description = groupDescription;
group.Update();
rootWeb.Update();
rootWeb.AllowUnsafeUpdates = false;
// Code-Update
SPGroup checkGroup = rootWeb.SiteGroups[groupName];
Trace.WriteLine(checkGroup.Description);
}
UPDATE:
I added some more lines of code to my method and fetch the group I altered before one more time to check its description property. This shows me that the group's description was changed as expected. But when I try to validate this by checking the group's description on the group settings page (UI) of the corresponding site collection, the group's description is still the old value.
UPDATE 2:
So I did some more testing on that issue and try to change the title of the group instead of the its description. Strange to say, but this one works perfect. The renaming of the group is shown in the UI immedatiely.