Grid Filter checkbox with clienttemplate text

0 Answers 28 Views
Filter Grid
Azhar
Top achievements
Rank 1
Iron
Azhar asked on 20 Nov 2023, 09:48 AM | edited on 20 Nov 2023, 03:47 PM
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?



No answers yet. Maybe you can help?

Tags
Filter Grid
Asked by
Azhar
Top achievements
Rank 1
Iron
Share this question
or