Uncaught Unable to find row identifier

Uncaught Unable to find row identifier

halamhalam Posts: 3Questions: 1Answers: 0

I read through the discussions for this issue and I have spent over a day and unable to get it right.
I am new to this so highly likely I am not doing this correctly.

I don't see anywhere in my code that sets the row id. I copied the example from

https://editor.datatables.net/examples/simple/simple.html

along with the php script.

Does anyone know how to check what the row id is? or how to troubleshoot this issue?

Answers

  • rf1234rf1234 Posts: 2,807Questions: 85Answers: 406
  • halamhalam Posts: 3Questions: 1Answers: 0

    Thanks @rf1234. I tried that already but that gives me the value of row id. I assume that if I don't set a row id then by default it will use DT_rowID but since I got the error. I am trying to figure out what I need to put for idSrc:

  • kthorngrenkthorngren Posts: 20,292Questions: 26Answers: 4,768

    If you click on the Ajax Load tab you will see that the Ajax response is using the default DT_RowId for the data. You don't have to use this you just need a unique field for each row of data.

    Do you have a unique field in your table rows? If so the, as the technote states set the idSrc to that field.

    Kevin

  • halamhalam Posts: 3Questions: 1Answers: 0

    hi Kevin:

    I did not set table row id. so I didn't expect to have to set idSrc. The only reason I am looking for that is because of the error I got. From reading the notes online (like the ones you and rf1234 sent me) I still cannot by pass this error. With this said the create, edit and delete buttons are not working for me.

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    The ID is needed to identify the row being created, edited or deleted. As the the other posts have said, your Ajax response needs to include a unique ID for each row.

    Colin

This discussion has been closed.