How do I set `ShowObjectMenu=false` on UniGrid from `Object Listing` template of Custom Module UI?

Patrick Taylor asked on March 20, 2018 16:39

Would anyone here happen to know how to remove the Action/Object menu from a UniGrid when implementing the Object Listing UI template for a custom module?

I've tried setting Control.ShowObjectMenu = false from the OnInit method of my ControlExtender class as illustrated in the "creating extenders for module interfaces pages" documentation.

I've also tried adding <key name="ShowObjectMenu" value="false" /> to the <options> section of the UniGrid definition XML as the documentation suggests might be possible in the UniGrid definition reference.

Because I'm utilizing an Object Listing template, I don't have an ASCX layout to set the ShowObjectMenu property from, so I think it has to be from the Control Extender class. Perhaps I need to do this from one of the Control events other than OnInit()? Screenshot of Custom Module UI for Reference

Correct Answer

Patrick Taylor answered on March 20, 2018 17:07

Sébastien Gumy answered this question for me in the Kentico-Community Slack channel. The solution is to add <action name="empty" contextmenu="~" /> in the <actions> section of the UniGrid Definition XML.

Screenshot of the Slack Thread where Sébastien Gumy provided the solution

Sébastien Gumy's response in Slack

2 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.