Solved

DataTables-Form Input column not sorting

Posted on 2016-10-05
7
73 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 16

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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…

816 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

8 Experts available now in Live!

Get 1:1 Help Now