Editor adds 'id' column; how do I prevent this?

Editor adds 'id' column; how do I prevent this?

jwisejwise Posts: 6Questions: 0Answers: 0
edited February 2013 in General
I just started using Editor yesterday, and generated some sample code with Generator. My js/table.name.js and php/table.name.php files both show only the fields I specified in Generator, but DT appears to be adding the ID row. Is there any way to override this and specify one of the fields I'm using as the row identifier instead?

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Absolutely - with the `pkey` method:
    http://editor.datatables.net/docs/current/php/class-DataTables.Editor.html#_pkey

    Or the third parameter in the constructor (which is default `id` ):
    http://editor.datatables.net/docs/current/php/class-DataTables.Editor.html#___construct

    Regards,
    Allan
  • jwisejwise Posts: 6Questions: 0Answers: 0
    Got it. Thanks!

    -John
This discussion has been closed.