alfajango / jquery-dynatable

A more-fun, semantic, alternative to datatables
http://www.dynatable.com
Other
2.77k stars 361 forks source link

Add an option to allow cells to be editable. #155

Closed rht closed 8 years ago

rht commented 9 years ago

Rationale: I know I can simple overwrite _cellWriter, but having a native option is better.

This will ease the writing process of a dynamic editable table, for example:

var dynatable = $("table.dynatable").dynatable({dataset: {records: records }}).data('dynatable');
// ...
// some code
// ...

function updateDynaTable() {
    var newrecords = dynatable.records.getFromTable();
    // clean up the content of newrecords
    // ...
    // replace old records
    dynatable.settings.dataset.originalRecords = newrecords;
    dynatable.process();
}
rht commented 8 years ago

(here goes) Dup of #229