change format of submitted inline ecits

change format of submitted inline ecits

Mwhite007Mwhite007 Posts: 5Questions: 2Answers: 0

i am using some code Allan provided to send data to my server in a simplified format and it looks like this:
action:edit
EmployeeID:15
LastName:Frazzetta

but i want it to look like this:
EmployeeID:15
FieldChanged: LastName
NewValue: Frazzetta

this way i can use the FieldChanged attribute to tell the query which field to change and use the NewValue attribute to tell the query what to update it to.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Answer ✓

    When we discussed this before we had the following in ajax.data:

                            $.each( values, function ( name, value ) {
                                d[ name ] = value;
                            } );
    

    What you could do is use:

                            $.each( values, function ( name, value ) {
                                d.FieldChanged = name;
                                d.NewValue = value;
                            } );
    

    Keep in mind that this is suitable for single field inline editing only. Using the main form editor with this will not work. Creating new rows with multiple fields will not work.

    Regards,
    Allan

This discussion has been closed.