Or better yet, call it 'selectedRow' instead of idx. **Variables should represent what they store**.