function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Soumya BeheraSoumya Behera 

How to know about the sort of the UI item in the controller ? Using sortable JQuery in UI.

Hi All,

I am tryging to update the sort order which user will change in the UI. Please let me know how my visualforce controller get to know the the sorting order. 

Soumya Behera
Hi Soumya ,
For sorting column in vf page please use the javascript.
<apex:includescript value="//" / >
        <apex:includescript value="//" />
        <apex:stylesheet value="//" />
            j$ = jQuery.noConflict();
            j$(document).ready( function () {
                var contactTable = j$('[id$="contacttable"]').DataTable({
                    "order": [],
                    "columnDefs": [ {
                      "targets"  : 'no-sort',
                      "orderable": false,
                      type: 'date-MM/DD/yyyy',                       

Soumya BeheraSoumya Behera
Hey Gyani,

Thank you for your reply.

I am able to change the order (sequence) of the item in the VF page . My question was regarding the same sequence need to update in the backend. like if i will have backend field Sequence__c than based on the UI changes , i need to update the sequence__c field value.

Please let me know if you have any solution on the above.

Really appriciate for you time to aswer the above.

Soumya Behera