Change Column Header in ListView

(function () { var ctxForm = {}; ctxForm.Templates = {}; ctxForm.OnPreRender = preTaskFormRenderer; SPClientTemplates.TemplateManager.RegisterTemplateOverrides(ctxForm); function preTaskFormRenderer(overrideCtx) { modifyHeaderData(overrideCtx); } function modifyHeaderData(overrideCtx) { var linkTitleField = overrideCtx.ListSchema.Field[0]; //Column number user wants to change what is displayed linkTitleField.DisplayName = "This is a column header"; //What the user wants to be displayed } })();
Use to change the column header in a ListView inside of a SharePoint site.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.