samedi 22 février 2020

customized checkboxes is not clickable in kendo grid

I have kendo grid with checkbox selection column and i customized this checkboxes but now checkboxes are not clickable cannot unchecked or checked

How can i solve this?

Here my code

@( Html.Kendo().Grid<MockUpForeNet.Controllers.CardDetailController.Days>()
     .Name("timegrid")
     .DataSource(d => d.Ajax().Read("TimeGridBinding", "CardDetail").Model(keys =>
     {
         keys.Id(k => k.DayId);
         keys.Field(c => c.DayName).Editable(false);
         keys.Field(c => c.DayId).Editable(false);
     }).PageSize(7))
               .Columns(c =>
               {
                   c.Bound(p => p.DayId).Width(100).Title(" ").ClientTemplate("#= chk2(data) #").Sortable(false);
                   c.Bound(e => e.DayName).Width("auto").Title("Day");
               })
       .Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.InCell))
       .Sortable()
       .ColumnMenu()
)

here my checkbox template

   function chk2(data) {
    return '<input id="masterCheck' + data.DayId + '" class="k-checkbox" type="checkbox" checked="checked" /><label for="masterCheck" class="k-checkbox-label"></label>';

}



Aucun commentaire:

Enregistrer un commentaire