Get the ids of the rows being edited in Editor

Get the ids of the rows being edited in Editor

menashemenashe Posts: 196Questions: 43Answers: 2

Allan,

Years ago you posted:

Edit - Having a method in Editor to get the ids of the rows being edited sounds sensible, I'll look into that.

How can I get the table row id (or, more generally, table row data) in the Editor?

I am trying to display a Nested DataTable from a table whose primary key is not a foreign key in the underlying row.

I have successfully written the "SQL" (Editor PHP), but I need to have a "where" condition to select the correct data!

Allan

Answers

  • allanallan Posts: 63,446Questions: 1Answers: 10,465 Site admin

    Hi,

    ids() will get you the ids of the rows currently being edited. However, depending on the way you've got the page setup, you might want to use row().data() to get the full data object for the row (which might give you the forigen key needed).

    Without a test case I'm not sure exactly how you've got things configured and what the data is, but hopefully this will help a little.

    Allan

Sign In or Register to comment.