Sorting rows

Sorting rows

MercenaireMercenaire Posts: 2Questions: 1Answers: 0

My first column contains a row child.
When I sort the colum the sorted column is incorrect.
I think it's because there are elements inside the td and not only text.
Is there a solution ?

<td>                        
    <span class="details-control fa fa-plus-circle showChild"></span>
    <span id="form01:j_idt89:0:donneeChild" class="hidden">
        <table class="display" id="lstDet0" style="width: 100%">
            <thead>
                <tr>
                    <th>text</th>
                <th>text</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                <td>text</td>
                <td>text</td>
            </tr>
            </tbody>
        </table>
    </span>  
    Title 
</td>

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,953
    Answer ✓

    The child detail rows are not apart of the Datatables data cache and don't affect the sorting. What are you expecting that column to be sorted by? Maybe you can put that data in a. hidden column using colmns.visible and use columns.orderData to sort the first column by the hidden column.

    Kevin

  • MercenaireMercenaire Posts: 2Questions: 1Answers: 0

    It's work.
    Thank you Kevin

Sign In or Register to comment.