Skip to main content
1 of 2

Hiding the Stop editing link when the QuickEdit grid is closed in SharePoint

I am trying to replicate the "Stop editing this list" link that is at the top of the page when in QuickEdit Mode. My link will be at the bottom. I want to the hide the when not in QuickEdit Mode. The code is returning nothing regardless of the mode it is in and there is a Console Error saying GetCtxFromView is undefined.

<script type="text/javascript"> var gridinfo = GetCtxFromView(window['WPQ2SchemaData'].View); if (gridinfo.inGridMode) { //in grid mode document.getElementById("lynk").style.display='block'; }else{ //in normal mode document.getElementById("lynk").style.display='hidden'; } </script> <a href="#" id="lynk" onclick="ExitGrid(window['WPQ2SchemaData'].View);">Stop</a> editing this list.