{ columns.Command(command => { command.Edit() .Text("e" /> { columns.Command(command => { command.Edit() .Text("e" /> { columns.Command(command => { command.Edit() .Text("e"/>

Telerik ASP.Net MVC controls - Grid Filter checkbox with clienttemplate text

13 views Asked by At

I have a ASP.NET MVC Grid

@(Html.Kendo().Grid<SysViewModel>()
        .Name("grid")
        .Columns(columns =>
        {
            columns.Command(command =>
            {
                command.Edit()
                .Text("edit")
                .UpdateText("update")
                .CancelText("cancel");
                command.Destroy().Text("delete");
            }).Width("8rem");

            columns.Bound(p => p.Id)
                .Title("ID")
                .Width("5rem");

            columns.Bound(p => p.CompanyId)
                .Title("Company")
                .ClientTemplate("#:CompanyName#")
                .EditorTemplateName("CompanyList")
                .Filterable(ftb => ftb.Multi(true).CheckAll(true))
                .Width("15rem");

As you can see the column shows CompanyName, but is bound to CompanyId.

When trying to get filter with checkboxes for company, using:

Filterable(ftb => ftb.Multi(true).CheckAll(true))

I get the checkboxes with CompanyId.

Is there any way to show the CompanyName instead of the CompanyId with the checkbox filter?

0

There are 0 answers