Added method to handle selection of tableView row and check/uncheck selection.