How we load data on editor fields ?, not from table, from an ajax call

How we load data on editor fields ?, not from table, from an ajax call

cristophercristopher Posts: 1Questions: 0Answers: 0
edited January 2013 in General
Helo,

We saw ur project alan, and looks good, keep working on it. Congratulations.
We would like to know if it is possible load data on editor window fields from an ajax call.
We would work with server side data.
We need to know if it is possible load the currently DB info on the editor window fields when u open the editor window, not taking the data from the clients table info ( javascript object ).

An end user could use the aplication, see a table list, after some seconds or minuts, he click on edit to edit a register(row) but that register info changed on DB, so, if we take the info to show from the oTable on client side, we are showing to the end user a not right info.

We need to know if this can be handle with ur library before we choose pay the license.

[code]
// Edit record
$('#example').on('click', 'a.editor_edit', function (e) {
e.preventDefault();

editor.edit(
$(this).parents('tr')[0],
'Edit record',
{ "label": "Update", "fn": function () { editor.submit() } }
);
} );
[/code]

Regards.

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    edited January 2013
    Yes absolutely. In fact I'm planning on writing a tutorial next week on this topic :-). You would use the Editor API, specifically the `set` method to set the values of the fields based on the values you want to set (i.e. what you get from Ajax).

    Thanks,
    Allan
This discussion has been closed.