Pages

Thursday, 4 June 2020

DocTypeGridEditor - Remove default DocType option

As I mentioned in my previous post, I'd be checking to get rid of the default "Doc Type" option in the popup below.
It allows your editors to choose any DocType (marked as "Element") and we can think of reasons why you wouldn't want this option to be available to them.


Even if you didn't mention it in your grid.editors.config.js, the "Doc Type" option is always there.

Turns out it's defined in the manifest-file (App_plugins\DocTypeGridEditor\package.manifest). If you make that gridEditors-property into an empty array, the option will no longer be there.

{
  "gridEditors": [],
  "javascript": [
    "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.resources.js",
    "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.services.js",
    "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js",
    "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.directives.js"
  ],
  "css": [
    "~/App_Plugins/DocTypeGridEditor/Css/doctypegrideditor.css"
  ]
}

I hope anyone can benefit from this. See you around!

No comments:

Post a Comment