Hi Arthur,
Thanks for using Syncfusion products.
We can check and uncheck the list items of the ListBox component in AJAX success using our existing methods uncheckItemsByIndices and checkItemsByIndices. Please refer to the following code example:
[script]
function click(e) {
$.ajax({
url: "ListBox/listbox",
type: 'POST',
dataType: "json",
success: function (result) {
var obj = $('#listboxsample').data("ejListBox");
var checkedindices = obj.model.checkItemsByIndex; //get the checked items
obj.uncheckItemsByIndices(checkedindices); //unchecked items
// obj.checkItemsByIndices("2,3"); // check the items
}
});
} |
Refer to the following sample:
In above sample, we have unchecked the list items that are checked in AJAX success.
Regards,
Selvamani S.