As per title, is it possible (and how) to modify default view in code so that it display contents of the list grouped by one of it's columns?
I tried the following:
defaultView.Query = String.Format(@"<GroupBy collapse='true'>" +
"<FieldRef Name='{0}' />" +
"</GroupBy>", SPBuiltInFieldId.TaskDueDate);
defaultView.Update();
but this doesn't seem to work.