Cannot set property '_aData' of undefined - pressed a button in the row to update the content

Cannot set property '_aData' of undefined - pressed a button in the row to update the content

matus.markmatus.mark Posts: 8Questions: 3Answers: 0

Hi,

I am trying to update a row in a datatable.
The button in the row opens a bootstrap modal, loads content from the server.
The content is actualy a javascript code, which should update the row, simply running this:

table.row(rowId).data(data).invalidate();

rowId and data is OK.

I think there is something with the button. As I would like to update the row that contains it.

Any help is much appreciated.
Thanks,
Mark

This question has accepted answers - jump to:

Answers

  • colincolin Posts: 15,118Questions: 1Answers: 2,583
    Answer ✓

    Hi @matus.mark ,

    Without seeing the code, my guess would be that data isn't in the format expected - maybe you're using an object and it should be an array perhaps.

    We're happy to take a look if you could link to a running test case showing the issue. 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

  • matus.markmatus.mark Posts: 8Questions: 3Answers: 0

    Thanks Colin,

    I think the problem is, that I insert the array of data simply json_encode the array in PHP. Can this be a problem?

    Thanks,
    Mark

  • allanallan Posts: 61,449Questions: 1Answers: 10,055 Site admin
    Answer ✓

    Hi Mark,

    I'm afraid it is impossible for us to say if that is the issue or not without a test case showing the issue. I don't know the original format of your data, nor the format of your update data. As Colin says they should match, but really we would need a test case showing the issue to be able to help.

    Allan

  • matus.markmatus.mark Posts: 8Questions: 3Answers: 0

    Hi Colin and Alan,

    It was - of course - my fault. Row id was OK, but no preceding # has been added, so the selector did not work.

    Thanks for your comments!
    Mark

This discussion has been closed.