I have a grid that I am displaying and I am trying 2 different methods.... The jquery version works and displays the data in the grid...
In Fiddler, I can see the return JSON and everything looks as it should in the browser
var url = "/memo/a/8/b/1"; // build URL to API
var dataSource = new kendo.data.DataSource({ // create datasource
transport: {
read: {
url: url,
dataType: "json",
}
}
});
When I try the same call using Razor (my preferred way), this will not display any data in the grid. I see in Fiddler the exact same return JSON as as the Jquery method above. But no data is being displayed. Any suggestions?
@(Html.Kendo().Grid<eWJB.Models.MemoModel>()
.Name("grid1")
.Columns(columns =>
{
columns.Bound(p => p.MemoID);
columns.Bound(p => p.Subject).Width(100).Title("Subject");
columns.Bound(p => p.Initials).Width(30).Title("Initials");
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Url(Url.RouteUrl("GetAllMemos", new {httproute ="", controller="Memo", branch=1, id=8 })).Type(HttpVerbs.Get))
)
.Sortable()
.Scrollable()
)
In Fiddler, I can see the return JSON and everything looks as it should in the browser
var url = "/memo/a/8/b/1"; // build URL to API
var dataSource = new kendo.data.DataSource({ // create datasource
transport: {
read: {
url: url,
dataType: "json",
}
}
});
When I try the same call using Razor (my preferred way), this will not display any data in the grid. I see in Fiddler the exact same return JSON as as the Jquery method above. But no data is being displayed. Any suggestions?
@(Html.Kendo().Grid<eWJB.Models.MemoModel>()
.Name("grid1")
.Columns(columns =>
{
columns.Bound(p => p.MemoID);
columns.Bound(p => p.Subject).Width(100).Title("Subject");
columns.Bound(p => p.Initials).Width(30).Title("Initials");
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Url(Url.RouteUrl("GetAllMemos", new {httproute ="", controller="Memo", branch=1, id=8 })).Type(HttpVerbs.Get))
)
.Sortable()
.Scrollable()
)