How to disable Quick Edit for a subform

How to disable Quick Edit for a subform

Is there a way to disable quick edit on a subform?
I tried to disable quick edit on a subform with ClientScript, but I was unable to set it to read-only with the code below.

  1. let fields = ZDK.Page.getField('Quoted_Items');
  2. field.setReadOnly(true);
log: Cannot read properties of undefined (reading 'setReadOnly')
  1. let fields = ZDK.Page.getForm('Quoted_Items');
  2. field.setReadOnly(true);
log: Cannot read properties of undefined (reading 'setReadOnly')