I have a data on a server with the CalbelCase formatting for properties. How bind column to model via lambda expression?
This example demonstrates this:
@(Html.Kendo().Grid<WebApplication66.Models.Contact>()
.Name("Grid")
.Columns(columns => {
columns.Bound(m => m.Name);
columns.Bound(m => m.Price);
})
.DataSource(d => d
.WebApi()
.Model(model => {
model.Id(m => m.Key);
model.Field(m => m.Name);
})
.Read(read => read.Action("Get", "Contacts"))
)
)
My JSON form WebApi controller:
{"data":[{"name":"Test Name","price":100,"key":0},{"name":"Test Name 2","price":1,"key":1}],"total":2,"aggregateResults":null,"errors":null}