Use ASP pagination with Datatables
Use ASP pagination with Datatables
Hi, I'm trying to use my own ASP pagination with Datatables JQuery (1.10.18).
The problem is that I cannot run the datatables script without removing the pagination that ASP generates when binding a GridView.
I'd like to know if there's a way to run the script without doing it.
At this moment, I'm running
$('#id_table tbody tr.tableClass-paginado').remove();
If I don't run this I get this error:
Cannot set property '_DT_CellIndex' of undefined
It's worth mentioning that I'm conscious about the problem with the table's header but I, already, solved this issue. It all works fine.
This discussion has been closed.
Answers
Hi @GreatNews ,
It's because DataTables is expecting one less column - which you fix by removing it before the initialisation. The other option is to add it into the initialisation configuration with
columns,Cheers,
Colin
But the problem is when I do not remove the asp pagination.
Hi @GreatNews ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin