Hello,
I've been struggling to get my grid to work with an Web API...I know the WebAPI works when I call it via web browser, I get a properly formatted json response, however I can't seem to get it to work when calling it with the datasource for the grid. I've tried using .Ajax() and .WebApi() and neither seems to work.
I also created a Action in my controller that returns the same information as the WebAPI just to see if I could get it to work using the Controller / Action and it worked just fine there, but I really wanted to use the Web API. Here's the code I'm trying to use...can anyone see anything obviously wrong?
@(Html.Kendo().Grid<
DefectFeature
>()
.Columns(column =>
{
column.Bound(df => df.Name)
.Title("Name");
column.Bound(df => df.LastUpdate)
.Title("Last Update");
})
.DataSource(dataSource => dataSource
.WebApi()
.Read(read => read.Url("http://cmd-roswell.redmond.corp.microsoft.com/api/DataMaintenance/GetDefectFeatures").Type(HttpVerbs.Get)))
.HtmlAttributes(new { style = "height:300px;" })
.Name("LKGBuildsGrid")
.Scrollable()
.Selectable()
.Sortable())