Deactivate selected column if a row is selected and vice versa

Hello, I need help in this:
I have datable that I have enabled both columns and rows to be selectable. However, I need one to be selectable at a time. That is, if you select a column, supposed there was a row that was selected earlier, it is deactivated, and vice versa.