Forum Discussion

hkhan's avatar
hkhan
Creator II
4 years ago
Solved

Javascript on grid

How can i block/disable userstatus when VFI from a grid is either being created or edited and where should i run the method? by lock i mean uneditable or the user should not be able to edit.
  • angela's avatar
    4 years ago

    You could use an onEditStart property event. When you return false the field is not editable, if you return true it is.

    You can also add extra code to make the property only editable at certain conditions.

    Some sample from one of my custom own ItemTypes:

    if (latestNativeId !== relationshipID)
    {
      ArasModules.notify("State of previous backups cannot be changed.", {type: "warning",timeout:2000});
      return false; // do not allow edit
    }