Editor - "Tab" between columns using the enter key
Editor - "Tab" between columns using the enter key

I'm looking for a way to switch between columns in inline mode using the enter key instead of the tab key. Is there any way to override the default enter key action and set it up with keys.keys?
I have searched the forums high and low but could not find any up-to-date info remotely relating to this.
I cannot link to my page as it is restricted, but this is what I have so far:
editor = new $.fn.dataTable.Editor({
table: '#irpdatalist',
fields: [
{name: "fileNo"},
{name: "holderNo"},
{name: "name"},
{name: "fleetNo"},
{name: "weightGroup"},
{name: "activeDate"},
{name: "inactiveDate"}
]
});
$('#irpdatalist').on( 'click', 'tbody td', function (e) {
editor.inline( this, {
onReturn: 'none'
});
} );
var table = $('#irpdatalist').DataTable({
dom: "Bfrtip",
ajax: "searcheditor.json",
order: [[2, 'asc']],
columns: [
{data: "fileNo"},
{data: "holderNo"},
{data: "name"},
{data: "fleetNo"},
{data: "weightGroup"},
{data: "activeDate"},
{data: "inactiveDate"}
],
select: false,
keys: {
keys: [ 13 ],
editor: editor,
editOnFocus: true
},
"paging": false,
"ordering": false,
"info": false,
"searching": false
});
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
I'm afraid the reason you haven't found anything about this is that there isn't an option for it. The closest would be to listen for
submitComplete
and then usekeys.move()
to shift the KeyTable focus to the next cell. I'm slightly wary of that sincesubmitComplete
could be triggered by clicking out of the ell as well as pressing a return key. It might be possible to do some combination of events to handle that, but its not something I've looked into.Allan
I figured as much but thought i'd ask anyway. Thanks Allan.