Confused on what happens when field value is changed

Confused on what happens when field value is changed

nsscottnsscott Posts: 24Questions: 10Answers: 0

I have created a live example allowing the user to inline edit their projections for each quarter: http://live.datatables.net/vejeqafu/5/edit

The user is able to click and change the data in an editable field. The problem is that once the user presses the enter key to commit the change the field takes on a "processing" icon and the update doesn't compete. I had expected the value to change and the user to be free to move on to update another field. What am I doing wrong?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,934Questions: 1Answers: 10,155 Site admin
    Answer ✓

    You aren't doing anything wrong as such, but possibly not doing enough! The issue here is that there isn't any server-side interaction. Normally, Editor would submit the edited data to the ajax option, which you have as a function here.

    Regardless of its a function or an actual Ajax call, Editor will submit the data in its standard format, and importantly expect data back in is required format.

    The way that data is passed back, when used as a function, is the successCallback function. Basically you call it with the data required.

    This comes back to what I mentioned in the other thread - we can get Editor running in the live.datatables.net site, but there is no server interaction.

    Should you be interested, there is a discussion about how to update the table client-side where I give an example of using ajax with a function that will do local editing, but generally speaking you will want the data to submit to the server for writing.

    Are you trying to reproduce an issue you are seeing? What is the error you see with your server-side process in place?

    Thanks,
    Allan

This discussion has been closed.