0

NOTE: this is the JQGrid MVC component I am asking about which is created in C# server side.

I'm trying to get the ClientSideEvents to fire when a row is deleted.

ClientSideEvents = new ClientSideEvents()
{
AfterDeleteDialogRowDeleted = "doUpdates"
AfterAjaxRequest = "test", 
}, 

The only one that actually calls anything is AfterAjaxRequest which will call a test javascript function

function test() {
alert('test');
}

function doUpdates() {
alert('doUpdates');
}

any ideas, this is driving me crazy!

Robin van der Knaap
  • 4,060
  • 2
  • 33
  • 48
ozz
  • 5,098
  • 1
  • 50
  • 73

1 Answers1

0

I had the same problem. I do not know if it is a bug. I solved the problem with a trick.

$(function() {
    setTimeout(function () {
        $("#myGrid").trigger('reloadGrid');
    }, 1000);
});

It was enough - all event handlers set with:

ClientSideEvents = new ClientSideEvents()
{
    AfterDeleteDialogRowDeleted = ....
    AfterAjaxRequest = ...., 
}

started to work

vanpersil
  • 764
  • 1
  • 8
  • 26