Hi,
I'm trying to use the Grid inTelerik UI for ASP.NET Core with a remote datasource:
@(Html.Kendo().Grid<DashboardEntry>()
.Name("dashboardGrid")
.Columns(columns =>
{
columns.Bound(p => p.Id).Width(50);
columns.Bound(p => p.State).Width(100); --> Enum property
})
.AutoBind(false)
.DataSource(dataSource =>
dataSource
.Ajax()
.ServerOperation(true)
.Batch(true)
.PageSize(20)
.Model(model => model.Id(p => p.Id))
.Read(read =>
read.Url("http://localhost:5000/dashboard/entries")
.Type(HttpVerbs.Get))
.Events(events => events.Error("error_handler"))
)
)
The json from server looks like this:
{
Data:[
{0: {Id: 22041, State: "Draft" },
{0: {Id: 22042, State: "Complete" }
],
Total: 2
}
Practically, the enum is actually a string, thanks to a StateConverter : JsonConverter.
But nothing is rendered/displayed in the State column.
How can I make it work?
Thanks.