I have three mechanisms for sorting 1) First Name 2) Last Name 3)
Created Date Currently, I am doing query for each type of sorting. That means I am hitting database 3 times. I want to do like this it will hit database at only first time and after that I will sort that array of object depending on the sorting user selected, on view itself. Is it possible? If yes please tell me. I am tried this but I am not able to do that. After that I done like this, Whenever user select sorting then I am giving an Ajax call. Going to controller with that array of objects and then tried to sort that array by using array sort method. But problem is that I am getting that array as a string from URL and the scope of object is lost. Anyone please tell me how to solve this problem?
Thanks & Regards, Tushar
Sounds odd that you are querying the database 3 times (in a row?)...