2

By default, the list view web part comes with a column containing a checkbox for each list row.

With the UI, it's possible to disable it by going into view's options and disabling the Allow individual item checkboxes option in the Tabular View section.

Is it possible to apply this setting programatically?

enter image description here

1

This setting is reflected as TabularView in the view XML definition. However, setting it on the view via CSOM seems not to be supported.

I managed to achieve the desired result with Client Side Rendering. I've injected the below JavaScript code with JSLink:

(function () {
    var overrideCtx = {};
    overrideCtx.Templates = {};

    overrideCtx.ListTemplateType = 100;
    overrideCtx.OnPreRender  = postRenderHandler;

    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
})();

function postRenderHandler(ctx) {
   ctx.ListSchema.TabularView = false;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.