Disable Command menu options for some DS's in form

Hi, Is there any class/method that needs changes in order to disable some or all options from the Command menu and also from the toolbar (e.g. Filter button/command)? Thank you.