How do I reference the selected row in a detail view?

I have a detail view and in the tables in that view I would like to apply some logic based on the selected row in the detailed view, is that possible somehow?