Row remove erroring

Row remove erroring

NiranjanKCNiranjanKC Posts: 2Questions: 1Answers: 0
edited March 2018 in Free community support

I am using a datatable inside a datatable. Each row has another datatable. Now for the inner datatable, i have a button in the main datatable which can add rows to it. I am using this code to add

var rowNode = pDataTable
                .row.add(v)
                .draw()
                .node();

Now each row added has a column with Delete button. When the Delete icon is clicked, I am using the following code:

pDataTable
    .row($(pControl).parents('tr'))
    .remove()
    .draw();

Now this delete row code is giving me a javascript error "0x80010012 - JavaScript runtime error: unknown exception"

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,235Questions: 1Answers: 2,597
    Answer ✓

    Hi

    At a glance, that looks OK. The code is similar to the last example on this page, the only thing that could be wrong is your $(pControl).

    I'd say take a look at that example, and hopefully that point you in the right direction. If not, would you be able to create a live example please that demonstrates the problem.

    Cheers,

    Colin

  • NiranjanKCNiranjanKC Posts: 2Questions: 1Answers: 0

    Thanks for the help. The issue was while i was adding the row there was a problem in JSON format. Hence the error while deleting.

This discussion has been closed.