I created a separate class in .js file to create grid for me,my class is simple as following:
function createDynamicGrid(chartId, source, column, titleOfGrid,onChange) {
chartId.kendoGrid({
toolbar: titleOfGrid,
dataSource: {
data: source,
},
change: onChange,
height: 350,
scrollable: true,
sortable: true,
filterable: true,
columns: column,
noRecords: {
template: "No data"
},
});
}
in my cshtml file ,i call the above class ,pass the parameters and get the grid,but the onChange event does not trigger :
createDynamicGrid($("#grid"), dataSource, clmns, change);
function onChange(e){
//here i should get the clicked event ,but cant!
}