Added the functionality to expand each record by clicking on it.