Search code examples
kenticounigrid

How to disable Unigrid action


I have created a module that maintains a list of color schemes. Some of the color schemes are default schemes and should never be deleted. However, some are custom schemes created by end users. I have an IsCustom field defined and it is set to true if the end user created the color scheme. you can see the value of that flag under the "Custome Color Scheme" column in the attached screenshot. My question is how do I disable the Delete action if IsCustom=false OR if {%CurrentUser.UserIsGlobalAdministrator%}. So for example, the only item that can be deleted in the screenshot is the Sublime color scheme. Unless, the user is a global administrator. enter image description here


Solution

  • You need to:

    1. Create a listing extender
    2. Assign it to the listing control Assign extender to the listing control
    3. Implement OnExternalDataBound event handler according to your requirements