anmarti
anmarti

Reputation: 5143

Why my Kendo grid shows checkbox disabled?

This is my kendo grid:

.Columns(columns =>
        {

        columns.Bound(c => c.Revisado).ClientTemplate("<input disabled='' type='checkbox' #= Revisado ? checked='checked':'' # class='chkbx' />")/*Template(t => @Html.CheckBox("chkSelect")).Width("5%").*/.HeaderTemplate(h => @Html.CheckBox("chkSelect", new { id = "chkTodos", title = "Seleccionar todo", onclick = "javascript:selectTodos($('#grddocs'));" }));
            columns.Bound(c => c.ID).Hidden(true);
            columns.Bound(c => c.Fecha).Title("Indexado el");
            columns.Bound(c => c.Usuario.ClaveUsuario).Title("Indexado por");
            columns.Bound(c => c.Cliente.NIFCIF).Title("Interviniente");
            columns.Bound(c => c.TipoDocumental).Title("Tipo documental");
            columns.Bound(c => c.NombreDocumento).Title("Nombre documento");
            columns.Bound(c => c.NombreDocumentoSGDAE).Title("Nombre documento Fired-Renting");
            columns.Bound(c => c.Revisado).Hidden(true);
            })
            .DataSource(dataSource => dataSource
            .Ajax()
            .PageSize(10)
            .ServerOperation(false)
            .Model(model =>
            {
                model.Id(i => i.ID);
            }
            ))
            .Editable(editable => editable.Mode(GridEditMode.InLine)) 

And this is how it looks:

enter image description here

You can see the checkbox is disabled.

How can enabled them?

Upvotes: 1

Views: 2242

Answers (1)

Jarosław Kończak
Jarosław Kończak

Reputation: 3407

Remove disabled='' from your client template in checkbox column:

.ClientTemplate("<input type='checkbox' #= Revisado ? checked='checked':'' # class='chkbx' />")

Upvotes: 1

Related Questions