in Education by
I want to disable the sort property in dataTable API. I use bsort:false to disable sorting from all the columns. This works good but still first column show sort icon. Why ? $("#reportgrid").DataTable({ "order": [],"bSort" : false, "iDisplayLength": 10, "sDom": '<"top">rt<"bottom"lp><"clear">', }); I use this code for dataTable. Here is the snapshot of my grid. In which first column having css of sorting_asc but i already disable sorting. So, How can i remove sort icon from first column ? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I know this is an old post but I faced the same problem today and the below solution worked for me. It will remove the sorting icon from the first column. $('#table').dataTable({ 'columnDefs': [{ 'orderable': false, 'targets': 0 }], // hide sort icon on header of first column 'aaSorting': [[1, 'asc']] // start to sort data in second column });

Related questions

0 votes
    I am trying to implement a behavior for my draggable items. The behavior is described here : My box ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    How can I sort a data.frame by multiple columns. E.x. I would like to sort the column q(descending) by column f (ascending) dd...
asked Jan 20, 2022 in Education by JackTerrance
0 votes
    I am using a framework, which returns invalid JSON String like: /* { "myobject" : "test"} */ ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    I have a set of oil wells compiled in the panda's data frame. It looks like this: wells = pd.DataFrame({'date ... -01-01 FIELDZ 10.8 Select the correct answer from above options...
asked Jan 19, 2022 in Education by JackTerrance
0 votes
    I have 2 data frames df1 Name 2010 2011 0 Jack 25 35 1 Jill 15 20 df2 Name 2010 2011 0 Berry 45 25 1 ... used the code df1.add(df2) Select the correct answer from above options...
asked Jan 18, 2022 in Education by JackTerrance
0 votes
    Please refer to my test case https://jsfiddle.net/1c3Lmace/13/ This is my code $(document).ready( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I am working on an application form with multiple Date of Birth fields. I have created a simple date ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 17, 2022 in Education by JackTerrance
0 votes
    I am working on an application form with multiple Date of Birth fields. I have created a simple date ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    I want to search a column of a datatable after values from a textbox. I want to search after ISBN ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 7, 2022 in Education by JackTerrance
0 votes
    I want to search a column of a datatable after values from a textbox. I want to search after ISBN ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    Apologies if this question is answered elsewhere on StackOverflow, I did my best to search for an answer ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
0 votes
    I have some data that looks like this: C:10 R:200 N/A E:3 N/A N:77 I'm trying to ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    In one Google sheet workbook, lets say I have Sheet1 with 5 rows as Sheet1 And I have Sheet2 as ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 6, 2022 in Education by JackTerrance
0 votes
    I am using datatable with Laravel to order a response that i receive from an API I connect to the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    I currently use a DataTable to get results from a database which I can use in my code. However, ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
...