I have seen some examples of using server side Kendo extensions to access Web API calls in the same project. But what about if the Web API is a different project and URL? We are doing this as an N-Tier where the Web API is the data access for multiple client applications. Do you have a same using the server side KendoGrid to access a Web API call that is located on a different server/URL? I can't figure this out.
Here is what I have tried. Both projects have a reference to the data classes so I hope to send a known type back and forth. But this doesn't work:
@(Html.Kendo().Grid<CustomerOrderModel>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(o => o.OrderNumber);
columns.Bound(p => p.Description);
columns.Bound(p => p.Description2);
columns.Bound(p => p.Notes);
})
.DataSource(dataSource => dataSource
.WebApi()
.Read(read => read.Url("http://localhost:52559/api/CustomerOrder").Type(HttpVerbs.Get))
)
)
Here is what I have tried. Both projects have a reference to the data classes so I hope to send a known type back and forth. But this doesn't work:
@(Html.Kendo().Grid<CustomerOrderModel>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(o => o.OrderNumber);
columns.Bound(p => p.Description);
columns.Bound(p => p.Description2);
columns.Bound(p => p.Notes);
})
.DataSource(dataSource => dataSource
.WebApi()
.Read(read => read.Url("http://localhost:52559/api/CustomerOrder").Type(HttpVerbs.Get))
)
)