I read the following link on how SharePoint 2013 supports disabling a site collection column inside the list's quick edit grid link. so I tried to apply the same inside a custom list. So I wrote the following JSLink :-

(function () {
    var overrideContext = {};
    overrideContext.Templates = overrideContext.Templates || {};
    overrideContext.Templates.OnPreRender = function(ctx) {
        var statusField = ctx.ListSchema.Field.filter(function(f) {
           return f.Name === 'Formate Number'
        if (statusField) {
            statusField[0].AllowGridEditing = false;

and then I associated the site column with the above js script using the following power shell command:-

$web = Get-SPWeb http://testsite
$field = $web.Fields["Formate Number"]
$field.JSLink = "/_layouts/15/testscript.js"

now when I access the list view page source inside my browser I can see that the testscript.js is being rendered , but this will not prevent editing the 'Formate Number' inside the quick edit grid ???

I am confused on why this is not working in my case?

1 Answer 1


In the Article the Author is using the column's internal name:

f.Name === 'Request_x0020_Status';

I think if you use the internal name of the column

f.Name === 'Formate Number'

which would be I am assuming 'Formate_x0020_Number' might solve the issue.

You can get the internal name for a column by browsing to the List Settings > Edit Column and look at the QueryString. This will be url encoded. You will get similar to the following:


%5F represents '_' and the field name is 'Formate_x0020_Number'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.