<br />
<b>Deprecated</b>:  YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php</b> on line <b>60</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\League\OAuth2\Client\Provider\AbstractProvider::authorize(): Implicitly marking parameter $redirectHandler as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/AbstractProvider.php</b> on line <b>416</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\Client::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Client.php</b> on line <b>181</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\ClientInterface::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/ClientInterface.php</b> on line <b>77</b><br />
{"id":210,"date":"2011-01-30T14:35:24","date_gmt":"2011-01-30T13:35:24","guid":{"rendered":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/"},"modified":"2011-01-30T14:35:24","modified_gmt":"2011-01-30T13:35:24","slug":"change-the-fields-order-in-the-sharepoint-view","status":"publish","type":"post","link":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/","title":{"rendered":"Change the fields order in the SharePoint View programmatically"},"content":{"rendered":"<p>I was asked today how to change the order of the fields programmatically in the SharePoint view (<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms456019.aspx\" target=\"_blank\">SPView<\/a>). Since there is no \u201cposition\u201d or \u201corder\u201d property, and since the \u201c<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.sharepoint.spview.viewfields.aspx\" target=\"_blank\">ViewFields<\/a>\u201d property returns a \u201c<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.sharepoint.spviewfieldcollection.aspx\" target=\"_blank\">SPViewFieldCollection<\/a>\u201d, which is not much more than a <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.collections.specialized.stringcollection.aspx\" target=\"_blank\">StringCollection<\/a>, it\u2019s not that straight-forward.<\/p>\n<p><!--more-->The easiest way is to accomplish this is to empty the ViewFields property of the current View, sort the fields as you would like to have it, and add it again, one by one, to the ViewFields.<\/p>\n<p>The following code snippet moves the field \u201cTest\u201d to the first position in all the Views except the \u201cExplorer View\u201d.<\/p>\n<pre class=\"brush: csharp; title: Code sample:; notranslate\" title=\"Code sample:\">\n\n\/\/iterate all the views\nint viewsCount = yourLibrary.Views.Count;\nfor (int i = 0; i &amp;lt; viewsCount; i++ )\n{\nSPView view = yourLibrary.Views&#x5B;i];\n\nif (view.Title != &quot;Explorer View&quot;)\n{\n\nStringCollection oldFields =\nview.ViewFields.ToStringCollection();\n\n\/\/clear all fields\nview.ViewFields.DeleteAll();\n\n\/\/add wanted field\nview.ViewFields.Add(yourLibrary.Fields&#x5B;&quot;test&quot;]);\n\n\/\/add orher fields\nforeach (string fieldName in oldFields)\n{\nif (fieldName != &quot;test&quot;)\n{\nif (yourLibrary.Fields.ContainsField(fieldName))\nview.ViewFields.Add(fieldName);\n}\n\n}\n\nview.Update();\n\nyourLibrary.Update();\n}\n}\n<\/pre>\n<div class=\"fb-background-color\">\n\t\t\t  <div \n\t\t\t  \tclass = \"fb-comments\" \n\t\t\t  \tdata-href = \"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/\"\n\t\t\t  \tdata-numposts = \"59\"\n\t\t\t  \tdata-lazy = \"true\"\n\t\t\t\tdata-colorscheme = \"light\"\n\t\t\t\tdata-order-by = \"time\"\n\t\t\t\tdata-mobile=true>\n\t\t\t  <\/div><\/div>\n\t\t  <style>\n\t\t    .fb-background-color {\n\t\t\t\tbackground:  !important;\n\t\t\t}\n\t\t\t.fb_iframe_widget_fluid_desktop iframe {\n\t\t\t    width: 100% !important;\n\t\t\t}\n\t\t  <\/style>\n\t\t  ","protected":false},"excerpt":{"rendered":"<p>I was asked today how to change the order of the fields programmatically in the SharePoint view (SPView). Since there is no \u201cposition\u201d or \u201corder\u201d property, and since the \u201cViewFields\u201d property returns a \u201cSPViewFieldCollection\u201d, which is not much more than a StringCollection, it\u2019s not that straight-forward.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[11],"tags":[54,55],"class_list":["post-210","post","type-post","status-publish","format-standard","hentry","category-development","tag-server-object-model","tag-sharepoint"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Change the fields order in the SharePoint View programmatically - Adis Jugo blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Change the fields order in the SharePoint View programmatically - Adis Jugo blog\" \/>\n<meta property=\"og:description\" content=\"I was asked today how to change the order of the fields programmatically in the SharePoint view (SPView). Since there is no \u201cposition\u201d or \u201corder\u201d property, and since the \u201cViewFields\u201d property returns a \u201cSPViewFieldCollection\u201d, which is not much more than a StringCollection, it\u2019s not that straight-forward.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/\" \/>\n<meta property=\"og:site_name\" content=\"Adis Jugo blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-01-30T13:35:24+00:00\" \/>\n<meta name=\"author\" content=\"adis.jugo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"adis.jugo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/\",\"name\":\"Change the fields order in the SharePoint View programmatically - Adis Jugo blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\"},\"datePublished\":\"2011-01-30T13:35:24+00:00\",\"author\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.sharedove.com\/adisjugo\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Change the fields order in the SharePoint View programmatically\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/\",\"name\":\"Adis Jugo blog\",\"description\":\"The Southern Side\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\",\"name\":\"adis.jugo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"caption\":\"adis.jugo\"},\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Change the fields order in the SharePoint View programmatically - Adis Jugo blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/","og_locale":"en_US","og_type":"article","og_title":"Change the fields order in the SharePoint View programmatically - Adis Jugo blog","og_description":"I was asked today how to change the order of the fields programmatically in the SharePoint view (SPView). Since there is no \u201cposition\u201d or \u201corder\u201d property, and since the \u201cViewFields\u201d property returns a \u201cSPViewFieldCollection\u201d, which is not much more than a StringCollection, it\u2019s not that straight-forward.","og_url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/","og_site_name":"Adis Jugo blog","article_published_time":"2011-01-30T13:35:24+00:00","author":"adis.jugo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"adis.jugo","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/","url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/","name":"Change the fields order in the SharePoint View programmatically - Adis Jugo blog","isPartOf":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website"},"datePublished":"2011-01-30T13:35:24+00:00","author":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c"},"breadcrumb":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/01\/30\/change-the-fields-order-in-the-sharepoint-view\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.sharedove.com\/adisjugo\/"},{"@type":"ListItem","position":2,"name":"Change the fields order in the SharePoint View programmatically"}]},{"@type":"WebSite","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website","url":"https:\/\/blog.sharedove.com\/adisjugo\/","name":"Adis Jugo blog","description":"The Southern Side","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c","name":"adis.jugo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","caption":"adis.jugo"},"url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/comments?post=210"}],"version-history":[{"count":0,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/210\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/media?parent=210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/categories?post=210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/tags?post=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}