One column search not working in datatable.Please help me

One column search not working in datatable.Please help me

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Can you give us some help here. What column isn't searching!? I tried "economy" and that worked for me. Please provide repeatable steps on how to reproduce the problem

  • swetalinaswetalina Posts: 8Questions: 2Answers: 0

    MYSTATUS column search not working. If i searching enable it not showing the result.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    It is working since all your rows have both "Enable" and "Disable" in them they always match, for example:

                                        <td>Enable</td>
                                        <td>
                                            <a href=http://demo.ratnatechnology.co.in/sizin_trip_new/admin/update_holiday_package/2>
                                                <button type="button" class="btn btn-outline-success">Edit</button></a>
                                            <a href=http://demo.ratnatechnology.co.in/sizin_trip_new/admin/delete_holiday_packages?id=2>
                                            <button type="button" class="btn btn-outline-danger">Delete</button></a>
                                                                                                                            <a class="btn btn-outline-warning" href="http://demo.ratnatechnology.co.in/sizin_trip_new/admin/active_inactive_package?id=2&package_status=2">
                                                Disable
                                            </a>
                                                                                </td>
    

    You need to use orthogonal data. For that last column, you need to return another string in columns.render for type filter, something like

    ```
    columnDefs: [
    {targets: -1, render: function(data, type) { return type === 'filter'? "" : data }}
    ]

    Cheers,

    Colin

This discussion has been closed.