InlineEditor fires the Create event
InlineEditor fires the Create event
![KostasR](https://secure.gravatar.com/avatar/60c8945ef602c587198f81c16df76dab/?default=https%3A%2F%2Fvanillicon.com%2F60c8945ef602c587198f81c16df76dab_200.png&rating=g&size=120)
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