Lets say there are 2 line items. I select lineitem1 click Edit and then Update it.
Now I select lineitem2 and click Edit, I see previous lineitem's values (i.e. lineitem1's values ) instead of lineItem2 .
Below is whats happending in the code. When I click on datatable Edit .
debugger is going to all the editor.dependent's like below. editor_preOpen is false here .
''' editor.dependent('Product[].id', function (val, data, callback) {
if (editor_preOpen) {
if (val !== null && val !== "null") {
editor.field("Audience[].id").val('');
GetAudByProductID(val, callback);
}
}
});'''
And then it actually goes to preOpen function.
'''editor.on('preOpen', function (e, json, data) '''
If answer is repopulating , where should i do it.