Problems/ ajax query

Problems/ ajax query

Mr BoombasticMr Boombastic Posts: 1Questions: 0Answers: 0

I have a problem when starting the plugin, I fill my table with a query to my database through ajax, then I insert my data in the html like this

$('.clientData').html(data); //i am using ajax

The problem is that the table is initially empty and the pluyin is not recognizing the data.

Replies

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    Yep, if you add data after the initialisation, DataTables will be unaware of it. The way to go would be to give that data to DataTables with ajax (example here), or ajax.data, or just supply the data with data (example here)

    Colin

Sign In or Register to comment.