Click here to Skip to main content
15,305,430 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have Kendo grid and have a checkbox placed on top of grid, now grid is suppose to change data on basis of checkbox click, without making grid refresh.

Additionally tried bellow code in onCheck(e) function, but not getting updated model values -

var grid = $("#grid").data("kendoGrid");
var gridData = grid.dataSource.view();

Hence, here on onCheck(e) function, i need to get something like "e.model" so that i can get my values for e.g. "e.model.USER_ID"

@(Html.Kendo().CheckBox()
.Name("Check")
.HtmlAttributes(new { onchange = "onCheck();" })
.Label("Check")

function onCheck(e) {
var grid = $("#grid").data("kendoGrid");
var gridData = grid.dataSource.view();
// gridData - not getting updated model data.
// Here e is coming as "undefined"
// I need something => e.model //e.model.USER_ID
}
Thanks

What I have tried:

@(Html.Kendo().CheckBox()
.Name("Check")
.HtmlAttributes(new { onchange = "onCheck();" })
.Label("Check")

function onCheck(e) {
var grid = $("#grid").data("kendoGrid");
var gridData = grid.dataSource.view();
// gridData - not getting updated model data.
// Here e is coming as "undefined"
// I need something => e.model //e.model.USER_ID
}
Posted
Updated 1-Jan-19 2:11am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900