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 () { alert(fromhide); 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; } } SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideContext); })(); 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" $field.Update($true) 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?