I am trying to tie a function to the Kendow grid toolbar button. I write the code like this:

toolbar: [{ name: "create", text:"<span id='AddContenderButton'>Добавить претендента</span>"} ] 

And the function itself:

 $("#AddContenderButton").click(function () { alert("Нажали добавить!"); }); 

But the function is not called (What am I doing wrong?

  • As usual, I am waiting for the sweep of your code in the dojo - Mstislav Pavlov

2 answers 2

Solved a problem. A bit clumsy, but it works. Just tied to the oncklick event feature. It is called and everything is processed normally.

     $("#AddContenderButton").ready().on("click", function () { alert("Нажали добавить!"); });