Specifying the RowID when loading data from the DOM

Specifying the RowID when loading data from the DOM

johnd28714johnd28714 Posts: 3Questions: 0Answers: 0
edited December 2012 in Editor
Hi All,

I'm using DataTables and the Editor and am loading data from the DOM instead of serverside. I'm having a problem with specifying the ids for the records used in the editor. I understand that in a server based scenario I can specify a DT_RowId field but how can I specify which field in my DOM data is the Row Id ?

Thanks,
John

Replies

  • allanallan Posts: 61,698Questions: 1Answers: 10,102 Site admin
    You'd simply set the `id` of the rows (i.e. the `tr` element) to be `row_{primary-key-id}` . In theory this example should show that working: http://editor.datatables.net/release/DataTables/extras/Editor/examples/htmlTable.php , but it appears to not be working at the moment... I'll check into why that is!

    Allan
  • allanallan Posts: 61,698Questions: 1Answers: 10,102 Site admin
    Its the way the site is set up :-(. Its reading the file, and not parsing the PHP. The principle however is correct!:

    [code]
    while ( $row=$res->fetch() ) {
    echo <<
  • johnd28714johnd28714 Posts: 3Questions: 0Answers: 0
    Hi Allan,

    Thanks so much for your quick response!

    John
This discussion has been closed.