Hi,
I'm trying to have a simple event that will execute on grid's databound but the grid doesn't seem to locate it.
The error is my script method is not define based on firebug
Here's my code..
I'm trying to have a simple event that will execute on grid's databound but the grid doesn't seem to locate it.
The error is my script method is not define based on firebug
Here's my code..
@(Html.Kendo().Grid<Model>() .Name("Grid") .Columns(columns => { columns.Bound(p => p.Name); columns.Bound(p => p.Allow); columns.Bound(p => p.Category); }) .DataSource(dataSource => dataSource .Ajax() .Group(group => group.Add(p => p.Category))
.Read(read => read.Action("Data", "Method")) ) .Selectable(selectable => selectable.Mode(GridSelectionMode.Single)) .Events(events => events.DataBound("GridOnDataBound")) )
<script type="text/javascript"> function GridOnDataBound() { alert("I'm in"); } </script>
If you are using the Grid (or another component that you are trying to attach an event handler to) in a partial view, place the handler:
before the component's declaration, not after it.