InlineEditor fires the Create event

InlineEditor fires the Create event

KostasRKostasR 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

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    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

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @KostasR ,

    The action for preSubmit when inline editing is edit, so you just need to check for that.

    Cheers,

    Colin

This discussion has been closed.