web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

sort the data displayed in html table.

(0) ShareShare
ReportReport
Posted on by 382

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

I have the same question (0)
  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    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

  • Suggested answer
    Rushikesh Bhujbal Profile Picture
    285 on at

    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/

  • Mohammed Waseem Profile Picture
    382 on at

    any more suggestions .

  • Community Member Profile Picture
    on at

    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

  • Mohammed Waseem Profile Picture
    382 on at

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans