Solved

DataTables-Form Input column not sorting

Posted on 2016-10-05
7
54 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 14

Expert Comment

by:SneekCo
Comment Utility
Have you considered using a calculated column to do what you want to do?
0
 
LVL 5

Author Comment

by:Isaac
Comment Utility
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
Comment Utility
Cannot go to your site, it gives a "permission denied" error
"The method "GetItems" of the type "List" ... is blocked by the administrator ...."
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Author Comment

by:Isaac
Comment Utility
0
 
LVL 24

Expert Comment

by:lenamtl
Comment Utility
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
Comment Utility
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
Comment Utility
Awesome!  Thanks!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now