I've got a Kendo grid and I'm trying to test a javascript function call after selecting a row.
<div id="datagrid">
@(Html.Kendo().Grid(Model)
.Name("datagrid_Concessoes")
.Columns(columns =>
{
columns.Bound(c => c.Id).Width(70);
columns.Bound(c => c.Code).Title("Código");
columns.Bound(c => c.Description).Title("Descrição");
columns.Bound(c => c.CreationDate).Title("Data de Criação");
columns.Bound(c => c.CreationUser).Title("Criado por");
})
.HtmlAttributes(new { style = "height: 534px;" })
.Scrollable()
.Sortable()
.Selectable()
.Events(e => e.Change("test"))
.Pageable(pageable => pageable
.Refresh(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(15)
.Read(read => read.Action("GetConcessoes", "MasterData"))
)
)
</div>
and the javascript:
function test() {
alert("test");
}
I get a javascript runtime error: 'test' is undefined as soon as the grid is about to be displayed. I tried the lines:
.Events(e => e.Change("test"))
.Events(e => e.Change("test()"))
but without luck
kendoUiversion is the latest andjqueryis 1.7.1