Hi Team,
I am using Kendo UI MVC Grid and trying to override the checkbox style using FontAwesome fonts. I thought of doing it through CSS alone but since we can't select parent selector through CSS I ended up using the filterMenuInit event.
Grid column is configured using:-
.Filterable(f => f.Multi(true).Search(true));
I am adding another label to the rendered checkbox text using the below function:-
function addCustomLabel(e) {
var container = e.container;
var allCheckboxes = $("input[type='checkbox']", container);
$.each(allCheckboxes, function (id) {
$(this).attr("id", 'chk' + id).addClass("blueCheckbox");
var checkbox = $(this)[0];
console.log(checkbox);
var parentLabel = $(this).parent('label');
var labelText = parentLabel.text();
parentLabel.empty();
parentLabel.append(checkbox);
parentLabel.append("<label for='"+ 'chk' + id +"'>" + labelText + "</label>");
});
}