Custom data source sorting doesn't work. can you help me?

Custom data source sorting doesn't work. can you help me?

ianparkianpark Posts: 4Questions: 1Answers: 0
edited May 2014 in DataTables 1.9

Hi guys. i have trouble in some simple situation. i need to some sorting function about custom data, so i saw this document - Custom data source sorting.

And i write some simple example following document.
Here is link of example

you can see 'header 1' doesn't sorted correctly.

can you explain about this situation? why doesn't it work?

This question has an accepted answers - jump to answer

Answers

  • ianparkianpark Posts: 4Questions: 1Answers: 0
    edited May 2014

    I figure out what is problem.

    value the order of oSettings.aoData are changed after sorting, but it is problem. because oSettings.aiDisplayMaster referenced index of aoData. so the order of aoData have to be immutable.

    now i know what is problem... but still doesn't know solution.

  • ianparkianpark Posts: 4Questions: 1Answers: 0
    edited May 2014

    here is link of working example

    Problem is this. older version select current DOM value using selector $( 'td:eq('+iCloumn+') input', .... but oSettings.aiDisplayMaster keep initial DOM internally.

    So i changed logic to use initial DOM and add new issue in github

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin
    Answer ✓

    Hi,

    I added a comment to your github issue earlier this morning. In short, I'd suggest updating to 1.10 and do it the 1.10 way :-)

    Allan

  • ianparkianpark Posts: 4Questions: 1Answers: 0

    thanks :)

    your explanation is valuable to me!

This discussion has been closed.