When I open settings-lock screen.the option for setting knock code is not highlighted and it says disabled by administrator, encryption policy or credential storage...
Welcome to Android Central! Do you use the phone for work? If so, the security needed for work-related email might prevent using knock code or other similar unlock methods.