I am using the above event to refresh other grids on the page when a specific grid has a row deleted.
My test code is as follows:
The rest of the code is omitted as it is not relevant.
The "hello" is triggering on page load, and not triggered at all when a row is confirmed removed. Am I missing something?
6 Answers, 1 is accepted
The event is expecting a function name to be pass to it.
Please pass a function and set the alert inside the function.
The expected syntax can be observed here:
If the issue still occurs, please provide an example as it could be caused by a factor which we are overlooking at this moment.
Alert is a function/method.
How I found this bug originally was trying to fire the event in a far more complicated grid using a different method/function. I then tried the remove event on a very simple grid using the alert function/method and found the same bug.
I'd suggest you guys testing this on your end and if it does work, shoot me a git repo that I can pull down and test myself. Right now all signs point to your source code. But I'd be very happy to be wrong!
I made an example using the remove event and it was fired as expected on my end.
Please check the example for reference is there is a difference between the real application.
If the issue still occurs, please provide an example reproducing the issue and I will gladly assist further.
I've used your example and found the same "bug."
The above triggers correctly.
The above will not.
How do we pass arguments into the method then?
Thank you for clarifying how the event is set.
The described behavior is expected as the Grid events expect a function name and not a direct function.
Also, they are internally triggered with predefined parameters and passing additional parameters is currently not supported.
The available parameters for the remove event can be observed here:
If these parameters are not helpful in the real application, please share with us the use case and we will check if the desired value can be retrieved inside the event during execution.
Thanks for the clarification Stefan.
My confusion came from the fact that some Kendo methods allow passing a function name with arguments, similar to actually invokinga method. This created the incorrect assumption that all Kendo methods can do this.