Editor with RowReorder doesn't post ajax request if idSrc is other than DT_RowId
Editor with RowReorder doesn't post ajax request if idSrc is other than DT_RowId
Link to test case:
http://live.datatables.net/dozifure/28/edit
Description of problem:
See the test case. As written, it allows re-ordering of rows, which calls the ajax function.
However, if you change the first line to
var idKey = 'id';
(which sets the idSrc
of the editor instance to "id"
rather than "DT_RowId"
)
then it no longer works: when you drag rows to reorder, the ajax function is never called, and the order column is not updated in the UI.
My data source doesn't have a field DT_RowId
, and I'd rather not have to create/assign one. Am I doing something wrong here, or is this a bug?
Replies
Thanks for the excellent example! Although the
idSrc
docs seem to indicate otherwise it looks like you need to set the Datatables optionrowId
, for example:http://live.datatables.net/tovuwubu/1/edit
@allan will need to comment on whether needing
rowId
is expected for this case.Kevin
That did the trick. Thanks so much @kthorngren!