Why does adding of a child row not trigger "createdRow" callback?

Why does adding of a child row not trigger "createdRow" callback?

bkalinicbkalinic Posts: 3Questions: 2Answers: 0

If we ad a "tr" element to the body, shouldn't the callback be triggered?
Is there a callback for when child row is created?

Answers

  • ThomDThomD Posts: 334Questions: 11Answers: 43

    Be careful in your terminology. .child() refers to a sub display of related data, not a new tr (AKA row) element.

    Please show some sample code.

  • bkalinicbkalinic Posts: 3Questions: 2Answers: 0

    Thanks for your reply.
    Basically, I have set up the "createdRow" callback which fires when each new data row gets inserted and I was expecting for the same callback to be called when I do something like this:
    tableApi.row("#1").child(
    $(
    '<tr>'+
    '<td>1.1</td>'+
    '<td>1.2</td>'+
    '<td>1.3</td>'+
    '<td>1.4</td>'+
    '<td>1.5</td>'+
    '<td>1.6</td>'+
    '<td>1.7</td>'+
    '<td>1.8</td>'+
    '<td>1.9</td>'+
    '</tr>'
    )
    ).show()
    I can see the child row but no callback. Maybe this is the expected behavior but I wasn't sure. So my question was whether or not there is some callback for such an action.
    Also, is there a way to add to a child row collection of a row instead of setting new child data that replaces any existing child rows?
    Thank you.

This discussion has been closed.