Row.Add() with hidden columns

Row.Add() with hidden columns

GoinsideGoinside Posts: 11Questions: 3Answers: 0

Hi,

I have a datatable with 2 columns hidden, of the total of 30 columns. I need to add a new row, by clone one <tr> element of the current datatable, calling table.row().add(trElement). It shows an alert telling that the number of the columns of the new row (28 columns) is not match with the number of the columns of the table (30).

I already tried to add the new row passing data object instead of the tr element but in this case, after add the row, I cannot select or edit (with editor plugin) this new row.

Thank you.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    It isn't possible to add a new row using a tr element when there are hidden columns. You need to do it by passing the data for the row to tr.

    If you are using Editor, then it uses the row.add() method with the raw data, so it shouldn't be an issue. If you are having problems with Editor in this regard, can you give me a link to the page please?

    Allan

Sign In or Register to comment.