Re: Nonmetalic sheathed cable
I think the key to what you are asking is the approved clamp. The general rule in both these sections require NM cable to be secured to the box.
quoted in part:
In 336-18 ?Exception No. 2: A wiring device identified for the use, without a separate outlet box, incorporating an integral cable clamp shall be permitted?
Some boxes use a wiring device that is factory designed to secure the NM cable to the box and their would be no need to use an approved cable clamp.
370-17(c) Nonmetallic Boxes.
Exception: Where nonmetallic-sheathed cable or underground feeder and branch-circuit cable is used with single gang boxes no larger than a nominal size 2? in. x 4 in., mounted in walls or ceilings, and where the cable is fastened within 8 in. (203 mm) of the box measured along the sheath and where the sheath extends through a cable knockout no less than ? in. (6.35 mm), securing the cable to the box shall not be required. Multiple cable entries shall be permitted in a single cable knockout opening.
In this exception there is no need to secure the NM to a single gang nonmetallic device box( by an approved clamp or an factory wiring device) but notice the cable needs to be secured within 8 in. of the box verses the normal 12 in.
Though this is not part of your thread if you are wiring in an agricultural building the cable needs to be secured with in 8 in. of the box even when you use an approved cable clamp.