How to enable sorting/searching for newly added columns/rows and their cell values of a web table?

How to enable sorting/searching for newly added columns/rows and their cell values of a web table?

sjagdish2007sjagdish2007 Posts: 1Questions: 1Answers: 0

I have added searching and sorting features for a web table and that works fine, using data table plug-in. The table allows for users to add new column and new rows. The challenge that I am facing is this newly added column is not having the sorting feature enabled. also any new values added to the cells within this column or new rows is not getting qualified for searching i.e., when these values are searched, no results appear.

Attaching screenshot of my code.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I suspect you're adding that column directly to the HTML - rather than re-initialising the table to use it. If you're adding it directly to the HTML, DataTables wouldn't know about it, and you would see what you're describing.

    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.

    Colin

Sign In or Register to comment.