Open Petrujie opened 7 years ago
The cells and their headers support this with HTML:
cols.Add("Check")
.WithHtmlEncoding(false)
.WithSorting(false)
.WithFiltering(false)
.WithVisibility(true, false)
.WithHeaderText("<input type='checkbox' id='selectAllCheck'>")
.WithValueTemplate("<input type='checkbox' class='my-select-class' value='{Model.Id}'>")
.WithPlainTextValueExpression(p => "");
$(function () {
$(document.body).on("click", "#selectAllCheck", function (e) {
var isChecked = $(this).prop("checked");
$('.my-select-class').each(function () {
$(this).prop('checked', isChecked);
});
});
});
I would suggest there should be a checkbox to select multiple records.