Solved

DataTables-Form Input column not sorting

Posted on 2016-10-05
7
92 Views
Last Modified: 2016-10-10
Hi All,

I implemented a datatable on my sharepoint 2013 site and I have an issue and a question.

Issue:
The first column does not sort like it should. Any ideas?  Here's an example of how it should work.

Here's my site

Question:
What would you suggest on how to update the 'Priority Number' column if the values were changed?
0
Comment
Question by:Isaac
7 Comments
 
LVL 17

Expert Comment

by:Walter Curtis
ID: 41832324
Have you considered using a calculated column to do what you want to do?
0
 
LVL 5

Author Comment

by:Isaac
ID: 41832558
No, I need to use the datatable b/c of the other features it has (fast and responsive search, item shown selection, etc.)
0
 
LVL 9

Expert Comment

by:Karen
ID: 41832929
Cannot go to your site, it gives a "permission denied" error
"The method "GetItems" of the type "List" ... is blocked by the administrator ...."
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 5

Author Comment

by:Isaac
ID: 41834577
0
 
LVL 25

Expert Comment

by:lenamtl
ID: 41835866
I don't think it is possible to filter on column that have input field,
even on their site it is not possible
https://datatables.net/examples/api/form.html
The filter is only on the first column because it's not using the input field
0
 
LVL 9

Accepted Solution

by:
Karen earned 500 total points
ID: 41836258
You can add a data-order attribute to the CELL of the column you wish to sort on, containing the value you wish it to sort by.
The datatables documentation about using "data-order" to sort columns can be found here
https://datatables.net/examples/advanced_init/html5-data-attributes.html
I have altered your js fiddle here
https://jsfiddle.net/sb4ohdkj/11/
0
 
LVL 5

Author Closing Comment

by:Isaac
ID: 41837593
Awesome!  Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question