I have data that will be displayed in the KendoUI grid. There are some boolean data, and I want them to display as flags. Also, when the user clicks the checkbox, I need to do something, so I need the onclick event for each row of data. How to do it in the KendoUI grid? How can I give each flag a different name and trigger onclick events? My code is:
@(Html.Kendo().Grid((IList<M.TS.DomainModel.C>)ViewData["peoplefind"]) .Name("Grid") .Columns(columns => { columns.Bound(p => p.FirstName); columns.Bound(p => p.LastName); columns.Bound(p => p.User).Title("Email"); columns.Bound(p => p.City); columns.Bound(p => p.TimeStamp).Title("Testdate").Format("{0:MM/dd/yyyy}"); columns.Command(command => command.Custom("Info").Click("showDetails")).Title("Info"); columns.Bound(p => p.CheckOK).ClientTemplate( "<input type='checkbox' value= '#= CheckOK #' " + "# if (CheckOK) { #" + "checked='checked'" + "# } #" + "/>" ); }) .Sortable() .Scrollable(scr => scr.Height(300)) .Groupable() .Selectable() .Pageable() .DataSource(dataSource => dataSource .Ajax() .PageSize(20) .ServerOperation(false)) .Resizable(resize => resize.Columns(true))
)
source share