_submit function - allowing for server to return partially populated row data

_submit function - allowing for server to return partially populated row data

jammyjammy Posts: 5Questions: 1Answers: 0

In the Editor.prototype._submit function, before the ajax call the row data is hived on into a copy (readValues) in case the server doesn't return json.row.

However, in the success function, setData is assigned either json.row or readData - have you considered using $.extend to allow for the possibility that the server returns only some of the fields in the row?

For my situation, this would massively cut down the number of times I get errors about unknown parameters in datasets.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    The ability to use the local parameters is really just a fallback - one to some extent that I regret putting in, although it was the correct thing to do at the time. So really it is a legacy feature.

    I would suggest now that the server should always return the full row data (ideally you could just call the same method that is used to populate the DataTable in the first place, selecting only the row in question).

    Regards,
    Allan

This discussion has been closed.