Is datatable loads all data from database ? Is it possible serial number unsortable?

Is datatable loads all data from database ? Is it possible serial number unsortable?

kabircsekabircse Posts: 4Questions: 1Answers: 0

I have tow questions:
1. Is dataTable loads all data from database at first time, even I use pagination ?
2. Is it possible a serial number column name unsortable, even I clicked other column name ?

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin
    1. Is dataTable loads all data from database at first time, even I use pagination ?

    If you are using client-side processing, yes. If you want to load the data, page at a time, DataTables also has a server-side processing mode. These two options are explained in the manual.

    1. Is it possible a serial number column name unsortable, even I clicked other column name ?

    To mark a column as unsortable use the columns.orderable option.

    Allan

  • kabircsekabircse Posts: 4Questions: 1Answers: 0
    edited April 2015

    Is it possible a serial number column name unsortable, even I clicked other column name ?

    According to your suggestion, when I clicked to second columns the first column also sort according to second column sorting.

    But, I want first column will be unchanging, such as all time it will display as 1,2...

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓
  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin

    Oh - you want it to be sorted, but so the user cannot change its sorting? In which case use orderFixed.

    Allan

  • kabircsekabircse Posts: 4Questions: 1Answers: 0

    Thanks............

  • kabircsekabircse Posts: 4Questions: 1Answers: 0

    Could you check this why it is not working http://jsfiddle.net/kabircse/53ew0xe0/

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin
    Answer ✓

    jquery.dataTables/1.9.0

    Try using the current release - 1.10.6. As noted in the documentation for orderFixed, it was introduced in v1.10.

    Allan

This discussion has been closed.