I wrote this script:
$.getJSON('<%=Url.Action("JsonSave","Controler")%>', {
id: newRow.Id,
personId: newRow.PesronId},
function(data) {
$('#grid').trigger('reloadGrid'); //{0}
$('#grid').editRow(rowCount); //{1}
})
})
What should I do so that {1} would be executed exactly after {0}?
ANSWER UPDATED I did a little research, and it seems you are using the jQuery Grid plugin. It has a callback called
gridCompletethat should do what you need. Combine that with my original answer to useoneand you will be all set:Since events are called in order, you could add your method into the event queue like this:
Using the
oneinstead ofbindcauses your event callback to be used only once.