We have implemented a similar solution with RadGrid and you can refer to this on-line demo
where it is implemented and implement your custom functionality with ListView accordingly.
I am attaching a sample runnable web page where the issue is isoalted.
Hope this will be helpful.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.