Skip to main content
Nintex Community Menu Bar

How to disable right-click on editable list view rows

  • February 15, 2022
  • 0 replies
  • 28 views
  • Translate

Forum|alt.badge.img+5
  • Nintex Employee
  • 3 replies

Topic

If there is a need to prevent users from right-clicking on editable list view rows, you can use jQuery to achieve this.

Instructions

  1. Add a Data Label control to your view. Make sure to enable the Literal property and disable the Prevent XSS property.
    23288iD77E2FC7F99BF40D.png
  2. Under the rule, "When the view executed initialize", add a Transfer Data action to the Data Label control.
    23289i18F417EBB5AB816F.png
  3. Map this script to the Data Label control under this action:
    <script type="text/javascript"> $(document).ready(function() { $("tr").on("contextmenu",function(){ return false; }); }); </script>​
  4. If users have the option to refresh the list view, then the script might stop functioning. To avoid this, you will need to add or edit, if existing, this rule: "When the View executed List refresh".
  5. Under this rule, add in the following actions, in order:
    1. Transfer data: pass an empty value to the Data Label control
      23301iC23C174C3B73EE49.png
    2. Transfer data: pass the same script above to the Data Label control
      23289i18F417EBB5AB816F.png

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings