<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hide Column Archives : Binary Bits</title>
	<atom:link href="https://blog.binarybits.net/tag/hide-column/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.binarybits.net/tag/hide-column/</link>
	<description>Bits &#38; Pieces - A blog by Kannan Balasubramanian</description>
	<lastBuildDate>Fri, 01 Dec 2017 06:27:47 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>Hide SharePoint list column</title>
		<link>https://blog.binarybits.net/hide-sharepoint-list-column/</link>
					<comments>https://blog.binarybits.net/hide-sharepoint-list-column/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Thu, 13 Jul 2017 07:18:40 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Hide Column]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=908</guid>

					<description><![CDATA[<p>Sometimes we need to hide specific SharePoint columns in a list view webpart. The following code will help with that. Make sure this code is placed in a JS file and referenced using JSLink webpart property. Just replace the HideColumn function&#8217;s array parameters [&#8220;Title&#8221;, &#8220;Created By&#8221;] with necessary column&#8217;s display names. (function () { var overrideCurrentContext [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/hide-sharepoint-list-column/">Hide SharePoint list column</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sometimes we need to hide specific SharePoint columns in a list view webpart. The following code will help with that.<br />
Make sure this code is placed in a JS file and referenced using JSLink webpart property.<br />
Just replace the <em>HideColumn</em> function&#8217;s array parameters <em>[&#8220;Title&#8221;, &#8220;Created By&#8221;]</em> with necessary column&#8217;s display names.</p>
<pre class="lang:js decode:true" title="Hide SharePoint Columns">(function () {
    var overrideCurrentContext = {};
    overrideCurrentContext.Templates = {};
    overrideCurrentContext.OnPostRender = PostRenderer;
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCurrentContext);
})();

function PostRenderer(ctx) {
    HideColumn(["Title", "Created By"],true);
}

function HideColumn(columns, hideOnlyHeader) {
    columns.forEach(function(columnName) {
        headerParentFirstNode = document.querySelectorAll("[displayname='" + columnName + "']")[0];
        if (headerParentFirstNode != undefined) {
            var header = headerParentFirstNode.parentNode;
            header.style.display = "none";
            if (!hideOnlyHeader) {
                var index = [].slice.call(header.parentNode.children).indexOf(header) + 1;
                for (var i = 0, cells = document.querySelectorAll("td:nth-child(" + index + ")"); i &lt; cells.length; i++) {
                    cells[i].style.display = "none";
                }
            }
        }
    });
}</pre>
<p>&nbsp;</p>
<p>The post <a href="https://blog.binarybits.net/hide-sharepoint-list-column/">Hide SharePoint list column</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/hide-sharepoint-list-column/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: blog.binarybits.net @ 2026-05-31 15:35:57 by W3 Total Cache
-->