This question is locked. New answers and comments are not allowed.
Hi,
I have a Telerik MVC Grid.
I am handling client side event for Column Selection Context Menu Change event to show or hide columns
Below is the code.
var unCheckedList = new Array();
$(document).delegate("#ClaimsGrid_contextMenu [type=checkbox]", "change", function () {
var index = $(this).data("field");
var column = $("#ClaimsGrid").data("tGrid").columns[index];
alert($(this).is(':checked'));
if (!$(this).is(':checked')) {
alert("UnChecked");
if ($.inArray(column.member, unCheckedList) == -1)
unCheckedList.push(column.member);
}
else {
alert("Checked");
$.each(unCheckedList, function (idx, value) {
if (value == column.member) {
unCheckedList.splice(idx, 1);
}
});
}
});
The code works fine if I uncheck a column. But the event is not fired when I check a column that I previously unchecked.
Appreciate any help in this regard.
Thanks,
Siva
I have a Telerik MVC Grid.
I am handling client side event for Column Selection Context Menu Change event to show or hide columns
Below is the code.
var unCheckedList = new Array();
$(document).delegate("#ClaimsGrid_contextMenu [type=checkbox]", "change", function () {
var index = $(this).data("field");
var column = $("#ClaimsGrid").data("tGrid").columns[index];
alert($(this).is(':checked'));
if (!$(this).is(':checked')) {
alert("UnChecked");
if ($.inArray(column.member, unCheckedList) == -1)
unCheckedList.push(column.member);
}
else {
alert("Checked");
$.each(unCheckedList, function (idx, value) {
if (value == column.member) {
unCheckedList.splice(idx, 1);
}
});
}
});
The code works fine if I uncheck a column. But the event is not fired when I check a column that I previously unchecked.
Appreciate any help in this regard.
Thanks,
Siva