Pagination & search correctly in dynamic sophisticated html table data.

Pagination & search correctly in dynamic sophisticated html table data.

SunnySanyalSunnySanyal Posts: 3Questions: 1Answers: 0

hii , we are generating a dynamic html string which is very complex as it contains several tables nested inside of one. we decided to use the datatable in the module. we have a table defination static coded in aspx which is having only head definition. we are using .html() method to fill the tbody using a class selector. we are using ajax methods to get data from sql server but here is the catch. we have done months of coding in designing the complex dynamic structure of tables in our system, so we cant afford to change it, but we also want to use datatable. when i use datatable with relative id of table it wont give us pagination and search. so how we can use datatable when we have a dynamic html string that is everytime on click updating according to data in sql, even though i use the datatable accordingly but my pagination wont work. we have used pagination in this project many times. but now issue is different as data is complex. i sorted out for pagination recently but im getting again an error when i click of all records button on first click it shows me data according to the select pagination option which is 10 records only but when i click on it again it shows all records.. can somebody help

Answers

  • kthorngrenkthorngren Posts: 21,173Questions: 26Answers: 4,923

    Start with this FAQ about updating the table directly in the DOM.

    i sorted out for pagination recently but im getting again an error when i click of all records button on first click it shows me data according to the select pagination option which is 10 records only but when i click on it again it shows all records.. can somebody help

    What is the error?

    Sounds like you have a lot going on which would be difficult to help debug without seeing it. Please post a link to your page or a test case replicating the issues.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

This discussion has been closed.