I want to display 30 list items on a page. On checkbox change
event I want to delete items from a SharePoint list.
I can do this using spgridview server side , but how can this be done client side (csom)?
you can try full rest api and JQuery.
Attach a change listener using jquery to your controls and on that listener you can use the next code
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('your_list')/items(your_id)",
type: "POST",
contentType: "application/json;odata=verbose",
headers: {
"IF-MATCH": "*",
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"X-HTTP-Method": "DELETE"
},
success: function (data) {
console.log(data);
},
error: function (data) {
console.log(data);
},
complete: function (data) {
console.log(data);
}
});
happy coding :)