johndoe
johndoe

Reputation: 291

Telerik MVC Grid ClientEvents are never fired

I am using the following code to fire the client events and the events are not being fired:

Telerik MVC Grid

@Html.Telerik().Grid(Model.Customers)
               .ClientEvents(events => events.OnRowDataBound("onDataBound"))
               .... further code

Event

 function onDataBound(sender,eventArgs) { alert(eventArgs);}

Upvotes: 1

Views: 4873

Answers (2)

divide_byzero
divide_byzero

Reputation: 790

the script should look like below:

function onDataBound(e) {
    alert(e)
}

That should fix the problem.

Upvotes: 1

Rosen Konstantinov
Rosen Konstantinov

Reputation: 106

Maybe you are using server binding, client events are fired with ajax binding only. You may refer to the grid's documentation here.

Upvotes: 4

Related Questions