Editor Using preEdit event to modify a server response

Editor Using preEdit event to modify a server response

aokellyaokelly Posts: 1Questions: 1Answers: 0

Hi,
I'm looking to use the preEdit event to an array with an object.
I'm not clear on how this is done.
function( e, json, data )
provides me with the json reponse and the parsed row info.. correct?
I can't replace the content of data (an array) with my object?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    I can't replace the content of data (an array) with my object?

    You can manipulate the object given, but you can't replace it completely.

    If you want to replace it completely, you would need to use ajax as a function to make the Ajax call yourself, then create the data you want to return, based on the actual return from the server, before passing it on to the Editor 'success' callback.

    Allan

This discussion has been closed.