DataTable plug-in usually used to control large amount of data. It manage it’s data with simple pagination functionality. To access Datatable rows they implemented few methods. It is necessary to use those method to traverse all the rows.
In order to access Datatable rows we can’t not use jQuery each method. if we use the jQuery each method then it will return only the visible rows. It will never return the rows which need to be accessed by pagination. But sometimes we need to check all checkboxes from the entire table. Therefore they develop some methods to access all the nodes of the Table. Here i will try to explain the situation.
First of all we need to declare the DataTable object. It is necessary to make the object public, so that we can use it from the entire page. After that we need to implement necessary function, where we will need to traverse the entire table. DataTable method fnGetNodes() is a function which will return all rows including invisible rows. Then we can traverse the rows by jQuery each method.
var $this = $(this);