The list has column a,b,f
I want to add some columns to the list and to the view. but in a defined order. I want column country and organization to be BETWEEN columns b and F
Is it possible?
SPList accessList = newSiteCollection.RootWeb.Lists.TryGetList("Workspace Access Rights");
if (accessList != null)
{
SPFieldCollection collFields = accessList.Fields;
collFields.Add("Country", SPFieldType.Text,false);
collFields.Add("Organisation", SPFieldType.Text, false);
collFields.Add("samAccountName", SPFieldType.Text, false);
SPView view = accessList.Views["All Items"];
view.ViewFields.Add("Country");
view.ViewFields.Add("Organisation");
}