Hello,
I try to select a record programmatically. In the code I've an ajax method :
var gridObject = document.getElementById("FlatGrid").ej2_instances[0];
$.ajax({
method: "POST",
url: urlPostCreateUpdateModal,
cache: false,
processData: false,
contentType: false,
data: formData,
beforeSend: function () {
...
},
complete: function () {
if (typeof $("#FlatGrid").attr("data-update-pendinglist") == "undefined") {
//Une fois l'ajax terminé on remove le loader et on ré affiche la vue partielle avec l'élément inséré
$('#loaderModalConnection').remove();
$("#partial").show();
}
}
}).done(function (result) {
gridObject.dataSource = JSON.parse(result);
gridObject.selectionModule.selectRow(selectedRowIndex, true);
}).fail(function (result) {
console.log("fail")
});
But when the grid is rendered, my row is not selected. I used selectionModule.selectRow like
here in the doc.
The grid is in the #partial
Regards