Jes Sie

Jes Sie

  • 741
  • 1.2k
  • 281.9k

How To Use JQuery DataTables inside a Content Page using C#

Sep 1 2021 4:11 AM

hello everyone, I am trying to implement a JQuery DataTables to my grid view inside a content page. Unfortunately, this is what I get

It treats the radio button as the target table

Below is my script

$(document).ready(function () {
            $("#ContentPlaceHolder1_gvList").prepend($("").append($(this).find("tr:first"))).DataTable();
        });

I tried to use below script but nothing happens:

$(document).ready(function () {
            $('#<%=gvList.ClientID%>').DataTable();

 

Hope someone can help me.


Answers (3)