I am not able to use sorting function of data tables,

I am not able to use sorting function of data tables,

9p5c9p5c Posts: 1Questions: 1Answers: 0

Datatables sorting mechanism not working when I'm trying to auto populate rows in the jsp page using <c:forEach function. When I'm normally declaring tr and td values of a tables, then it is working fine but when I'm trying to use c:forEach, sorting mechanism is not working. Please help what to do.

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    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

  • kthorngrenkthorngren Posts: 20,299Questions: 26Answers: 4,769

    Make sure you are initializing Datatables after the <c:forEach function. If you initialize Datatables before the function Datatables won't know about the added rows. Also see this FAQ.

    Kevin

Sign In or Register to comment.