KendoUI Grid input styling in column

708 views Asked by At

I have a kendoui grid that is being generated with this:

<div id="clientsDb">
@(Html.Kendo().Grid<example.OpenAccess.OBClientSetup>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(obcs => obcs.ProfileName).Width(140);
        columns.Bound(obcs => obcs.Default).Width(190);
        columns.Bound(obcs => obcs.EEFinalize).Width(100);
        columns.Bound(obcs => obcs.Completed).Width(110);
        columns.Command(command => { command.Edit(); command.Destroy(); });
    })
    .Groupable()
    .Pageable()
    .Sortable()
            .Editable(editable => editable.Mode(GridEditMode.InLine))
    .DataSource(dataSource => dataSource
        .Ajax()
                    .Read(read => read.Action("OB2_ClientProfiles", "OB"))
            .Update(update => update.Action("EditingInline_Update", "OB"))
            .Destroy(update => update.Action("EditingInline_Destroy", "OB"))
            .Model(model => model.Id(obcs => obcs.SetupID))
    )
)
</div>

With this I cannot figure out how to style the columns.Bound(obcs => obcs.Default).Width(190); select inputs in the column. Its a select input dropdown but i haven't figured out how to style with form-control out of bootstrap. or even its own style from a temmplate within the grid code.

1

There are 1 answers

2
Austin Philp On

columns.Bound(obcs => obcs.Default) .Width(190) .HtmlAttributes(new {@class = "form-control "}); You can add any attributes using the HtmlAttributes Function