This is a migrated thread and some comments may be shown as answers.

How to set the column editor javascript function from asp.netmvc razor lambda way?

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Veteran
Ed asked on 25 Oct 2020, 12:42 AM

I came accross this code that I need to implemente on my numeric column in a grid that uses popup editor:

...

columns: ["ProductName",{ field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: 120,editor: editNumber },{ field: "Discontinued", width: 120, editor: customBoolEditor },{ command: "destroy", title: " ", width: 150 }], editable: true});});

...

 

How can I do the same in the razor selector, ex:

 

columns.Bound(c=>c.UnitPrice).Title("Unit Price").???

 

thanks

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 27 Oct 2020, 12:08 PM

Hi Ed,

 

The Kendo HTML Helpers provide properties for the listed settings:

                columns.Bound(p => p.Freight).Format("{0:P0}").Title("My Title")
                .Width(120).EditorTemplateName("EditorName");
I hope this will prove helpful.

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Ed
Top achievements
Rank 1
Veteran
Answers by
Eyup
Telerik team
Share this question
or