GridView Searching Filtering Paging with MasterPage using jQuery Bootstrap DataTable Plugin in ASP.Net

Last Reply on Apr 06, 2017 06:48 AM By dharmendr

Posted on Apr 06, 2017 02:25 AM

I tried to apply bootstrap datatable plugin and it's working but problem is the headers are showing in each rows how to prevent this ?

 

Posted on Apr 06, 2017 06:48 AM Modified on on Apr 06, 2017 06:54 AM
YacharuP says:
<script type="text/javascript">
        $(function () {
            $('[id*=grd_dist_master]').prepend($("<thead></thead>").append($(this).find("tr:first"))).DataTable({
                "responsive": true,
                "sPaginationType": "full_numbers"
            });
        });
    </script>

 Change the above with the below.

<script type="text/javascript">
    $(function () {
        $('[id$=grd_dist_master]').prepend($("<thead></thead>").append($(this).find("tr:first"))).DataTable({
            "responsive": true,
            "sPaginationType": "full_numbers"
        });
    });
</script>

As you are using master page find id that ends with grd_dist_master.