since you are getting all this using ur custom logic I think u can now even go ahead and remove the data drid and use the list VIew .That way u can use a simple layout grid to show headers and on click of headers u can trigger the change and achieve the desired result.
on thing worth trying is using data grid for this and let mendix generate all the microflows and nanoflows for sorting and pagination and then remove datadrid and use data grid 2 .I haven't tried it my self but I think this should work too if you are going to use Datagrid 2 only.
Hi Senthil,
For this requirement, you can create an NPE, and then use it as a parent dataview for the datagrid 2,
Now, for sorting/Filtering purpose, you can use retrieve and Xpath, and sorts based on your requirement.
Other way to achieve this is to use OQL instead of XPath,
and write queries, that will help you to achieve various requirement, based on your need.
Let me know, if you face any issues,
Hope it helps!