Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82616

Column Filter doesn't work with hyperlink?

$
0
0

In my datatable, I am using columnFilter add-on and first column (ID) data has hyperlink. Hyperlink navigates to expected page but filter for this particular column (ID) doesnt't work. Any help is much appreciated. Below is my code

    <script>

        var dataSetString = $('#hiddenData').attr('value');
        var dataSet = eval(dataSetString);

        $(document).ready(function() {

           var table = $('#example').dataTable( {

                "data": dataSet,
                "aoColumns": [
                            { "title": "Id"},
                            { "title": "Issue Date" },
                            { "title": "Expiry Date" },
                            { "title": "Area" }
                ],
                "columnDefs": [
                               //title column has hyperlinks
                               {
                                   "render": function ( data, type, row ) {
                                       return '<a href="#{request.contextPath}/module/misc/module/search/titleDetails.jsf?titleId=' + data + '"><i class="fa fa-external-link"></i> ' + data + '</a>' ;
                                   },
                                   "targets": 0
                               }
                ],
                "order": [[ 0, "desc" ]]
            } );

            table.columnFilter({ sPlaceHolder: "head:before",
                aoColumns: [ {type: "number"},
                             {type: "number"},
                             {type: "number"},
                             {type: "number"}


                           ]

            });

        } );

    </script>

Viewing all articles
Browse latest Browse all 82616

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>