DATA TABLES - Disable default sort

1 reply · opened Apr 24, 2018

Wweb404Apr 24, 2018

Hello
In DATA TABLES /component-datatable.html table row default sort goes by name A->Z

How can i disable default sort and see table row how it goes in code


							
								
									Name
									Position
									Office
									Age
									Start date
									Salary
								
							
							
								
									Name
									Position
									Office
									Age
									Start date
									Salary
								
							
							
								          Tiger Nixon
									System Architect
									Edinburgh
									61
									2011/04/25
									$320,800
								
								       Garrett Winters
									Accountant
									Tokyo
									63
									2011/07/25
									$170,750
								
								        Ashton Cox
									Junior Technical Author
									San Francisco
									66
									2009/01/12
									$86,000
								
.......
SSemicolon WebSTAFFMay 2, 2018

Hello,

Simply use the following code:

$('#datatable1').dataTable({
	'ordering': false
});

For complete documentation, simply check this Link: https://datatables.net/manual/ .

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard