Dependeny by searching option

Dependeny by searching option

evaLautevaLaut Posts: 11Questions: 4Answers: 0

Hey,

i have a question about dependency. My problem is, the first, second and third row should stay together, also the fourth, fifth and sixth row should stay together the hole time. That's okay, until i use the order buttons.
Does anyone understand my problem and knows an answer?

I'm looking forward to your suggestions :-)

This question has an accepted answers - jump to answer

Answers

  • evaLautevaLaut Posts: 11Questions: 4Answers: 0

    And know i learned how to make a debugging example and there it is:

    http://codepen.io/anon/pen/NrPKvb

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    In DataTables the rows are 100% independent of each other. If you want rows to be next to each other that needs to be specified in the table's sorting. You can apply a "prefix sort" (i.e. always performed before the user's own sort) using the orderFixed option.

    Allan

  • evaLautevaLaut Posts: 11Questions: 4Answers: 0

    Thanks for the answer :-)

    It's a nice option, but unfortunately it doesn't solve my problem...

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    Could you say why not? If there is a missing feature you are looking for I'd be interested to know what.

    Allan

  • evaLautevaLaut Posts: 11Questions: 4Answers: 0

    Hey Allan,

    i'm sorry for the complications..
    I made a new example for better understanding: http://codepen.io/anon/pen/KMwqPQ
    In this example i used the orderFixed pre function. The productNum rows stick together, thats fine. But the search function doesn't work anymore, for example the BruttoAdt search.

    If i use the post function, the searching is working great, but the rows with the same productNum are mixed up..

    So i'm looking for a functionality that the rows with the same productnum are stick together the hole time and the search button is still working..

    At the moment i tried to explain my problem, i notized that it could be really complicated for the search button, to compare 3 rows with another three rows....

    Maybe you have an idea how to solve this problem, or know an already existing function, i haven't found?

    Thanks for your magnificent help !

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    Thanks for the update. I'm afraid I'm traveling at the moment so can't look into this in detail (phone screen doesn't really lead itself to debugging!) but will take a look when I get back.

    Allan

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

    But the search function doesn't work anymore, for example the BruttoAdt search.

    I don't quite understand I'm afraid. Given your example are you expecting that if you type 123 into the search box then the first three rows would be shown? Unfortunately that is not how DataTables works. Each row is independent and can be filtered out independently of the others.

    Allan

  • evaLautevaLaut Posts: 11Questions: 4Answers: 0

    I'm sorry for the mistake. I mixed the search function with the order function, i'm sorry :-(
    Thanks a lot for your help. But i realised that the idea i had, isn't implementable.
    So i tried it another way, with the child row functionality.

This discussion has been closed.