Solved

DataTables-Form Input column not sorting

Posted on 2016-10-05
7
65 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 15

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 5

Author Comment

by:Isaac
ID: 41834577
0
 
LVL 24

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint 2013 6 18
Jquey and footrable 2 33
Add Context Menu Item 4 43
How to make interactive HTML code pages like w3school or Codecademy? 3 29
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…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…

947 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

21 Experts available now in Live!

Get 1:1 Help Now