Hi,
If the datastore which you want to remove stores ISO files, one of ISO files might be attached to a VM.
Just right click on the VM, click "Edit Settings..." and when you click "CD/DVD drive 1", you should probably see "Datastore ISO file" selected on the right side. So change this to "Client Device" and then press OK...
Now you can remove datastore successfully.
King regards.