Notifications
Announcements
No record found.
Hi Experts,
Am displaying the results retrieved form odata in a html table.how can i sort the data in the table.suggestions please.
Thankyou,
Mohammed Waseem.
*This post is locked for comments
You would need to sort the data using the original query or use array.sort. You can check out www.sparkleXRM.com for lots of examples of showing html grids of data.
Hope this helps
If you are using simple HTML Table, and you want to sort the table after loading all data, then it will be quite difficult. Because once the DOM object is created for simple HTML table you cannot manipulate its data.
You have three possible Solution.
1) Sort the Odata response array object before loading record.
2) Add "$orderby" parameter to your Query String
refer : msdn.microsoft.com/.../gg309461(v=crm.7).aspx
3) And to Sort data after loading on HTML Table, Then i would suggest, Use Jquery Data Table. It requires some javascript implementation.
refer : https://datatables.net/
any more suggestions .
Hello Mohamed,
You can sort the result using the keyword "orderby" in the query url.
For more information, Here is a list with all REST Odata keywords:-
www.itlec.com/.../restodata-mscrm.html
i found this below link helpfull
www.kryogenix.org/.../sorttable
Thanks,
Mohammed Waseem
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2