How to add row id, to make it editable??

How to add row id, to make it editable??

shashidharnkshashidharnk Posts: 7Questions: 2Answers: 0

hi, i need to make 4th column 'editable' in Table (#accountOwnerLegalDesc).
if user clicks in this field, user should be provided with inline field to enter string.
i just tried, but i am getting an error, saying: ['Uncaught Unable to find row identifier For more information, please refer to https://datatables.net/tn/14'].

http://debug.datatables.net/irarov
its the debugging link.

Replies

  • shashidharnkshashidharnk Posts: 7Questions: 2Answers: 0

    .row.add() is used to draw the table. so am not getting how to add row id.. help me soon..

  • allanallan Posts: 63,893Questions: 1Answers: 10,531 Site admin

    As that table is array data based (while the other one is object based) the easiest way is probably to use createdRow and add the ID like you are doing with columns.createdCell.

    Worth noting that your code for columns.createdCell is producing invalid HTML since it will result in multiple elements with the same ID.

    Allan

  • shashidharnkshashidharnk Posts: 7Questions: 2Answers: 0

    hey.. hi! Allan..

    Its really awesome to use DATATABLES.. Its ammazing..

    actually, i used object based data, and now i am able to edit inline.

    Thanks for the reply, thanks a lot..

  • shashidharnkshashidharnk Posts: 7Questions: 2Answers: 0

    and one more thing..

    i need to have the edited data (or submitted data) in a variable, and i ll send it to server later in a function, and update my table, when user clicks a button named "submit".

    Question is: how do i send this data to my function??

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    DataTables' Editor already does all of that for you. Why do you want a new function?

  • shashidharnkshashidharnk Posts: 7Questions: 2Answers: 0

    Actually i ve other input field - data so i ll send a single ajax call to update to the table

This discussion has been closed.