2
votes

How can I have multiple functions for DataBound in Kendo Grid MVC

events.DataBound().Events(events => events.DataBound("AdvancedGrid.onDataBound", "alertMe"));

so it will trig both function.

2
have one function that wraps multiple others? - aw04
I making C# extensions for Kendo Grid, everyone who will use it will use AdvancedGrid.js methods plus their DataBound method - Andrian Durlestean

2 Answers

2
votes

Try this. It works fine for me.

.Events(ev=>{ev.DataBound(@<text>function(e){ onDataBound(e); alertMe(); }</text>); })
1
votes

Through HtmlHelper you can't add more function to event so I look in DOM object found grid and saw that _events -> dataBound is array, so I added run this

var grid = $("#MyGrid").data("kendoGrid");
grid.bind("dataBound", alertMe);
grid.dataSource.fetch();

and now my dataBound has 2 events

enter image description here