I need to change the context menu name on the specific event.
I am trying with below code and it is not working. Please advise.
{
name: 'Pause Grid',
action: function () {
var lochkPauseID = this.element[0].id.replace("gridfilter", "chkPausetbl");
$("#" + lochkPauseID).prop("checked", !$("#" + lochkPauseID).is(':checked'));
if ($("#" + lochkPauseID).is(':checked'))
{
alert(("Grid Paused.");
this.name = "UnPause Grid"
}
else
{
alert("Grid UnPaused.");
this.name = "Pause Grid"
}
}
}