I ran into the same issue recently, and it turned out the problem was tied to how the grid re-renders after sorting. When the grid refreshes, it replaces the HTML elements, so the previously attached jQuery click handlers are lost. The best fix is to use event delegation instead of binding directly. Try attaching your handler like this:
$(document).on("click", ".delete-button", function () {
return confirm('Are you sure you want to proceed?');
});
This way, the listener remains active even after sorting or refreshing the grid. It’s a simple but effective solution that keeps your onclick events consistent across DOM updates.