How to enable and disable selecting of