In OpenMediaVault the button may be greyed out if the Shared Folder is still Referenced. References can include file shares but also plugins. In this case there was a Shared Folder that had been used for Time Machine and after removing the SMB share and verifying plugins, the Delete button was still greyed out.
First you can try to verify what is referencing the shared folder in this OMV file.
/etc/openmediavault/config.xml
Find the shared folder in question and note the UUID. Then search for that UUID in the same file.
In this case I had an afp section with data between the tags <afp> and </afp>. It had the the UUID stored as <sharedfolderref>UUID</sharedfolderref>.
The afp section was used by the the old netatalk plugin that was in OMV 4 but is no longer part of OMV 5 (the system had been upgraded). However it was not possible to uninstall the plugin since it didn’t appear in the list of available packages.
Alternatively the plugin can be uninstalled via command line. Close the config.xml file then run the console command:
sudo dpkg -P openmediavault-netatalk
Once uninstalled, you can go back to the config.xml file and verify that the afp section was removed automatically.
Refresh the OMV control panel -> Access Rights Management -> Shared Folders. The folder in question should no longer be Referenced and the delete button no longer grayed out.