InlineEditor fires the Create event
InlineEditor fires the Create event
KostasR
Posts: 24Questions: 5Answers: 0
Hi,
When I edit a record with InlineEditor gets the action == create. How can I intercept this please?
editor.on( 'preSubmit', function ( e, data, action ) {
if ( action == 'create' ) {
//<<< The InlineEditor comes in here >>>
$.each( data.data, function ( key, values ) {
var i = newID--;
data.data[ key ]['ID'] = i;
data.data[ i ] = data.data[key];
delete data.data[key];
} );
}
} );
Regards,
Kostas
This discussion has been closed.
Answers
I'm afraid I don't really understand. Inline editing only works for editing - it doesn't currently support creating new rows I'm afraid.
Allan
Hi @KostasR ,
The action for
preSubmit
when inline editing isedit
, so you just need to check for that.Cheers,
Colin