Kendo.UI 2013.3.1324
I am cutting/pasting sample code from MVC grid control for local data. My IEnumerable list of data is populated into SearchResults. When I look at the HTML source, I see all the row and column data in the table, and repeated again in the kendoGrid() method as JSON. Not sure why it is repeated again here. What actually renders though, is that I see all the data in the grid flash for a millisecond on page load, but then it shows "No items to display" with empty grid. Obviously when it hits the kendoGrid() method, something goes wrong. If I add Deferred(true), then the grid is populated, but paging does an undesirable postback. So, why is the code populate both the HTML table, and the JSON passed to kendoGrid() method?
@(Html.Kendo().Grid(Model.SearchResults)
.Name("GridResults")
.Columns(columns =>
{
columns.Template(p => @Html.ActionLink("Edit", "Edit", new { Id = p.RecipeId }));
columns.Bound(p => p.ProductType).Title("Type");
columns.Bound(p => p.DisplayRecipeId).Title("Recipe ID").Width(130);
columns.Bound(p => p.RecipeName).Title("Recipe Name").Width(130);
columns.Bound(p => p.Status).Width(130);
columns.Bound(p => p.CreateDate).Title("Create Date");
columns.Bound(p => p.RevisedDate).Title("Revised Date");
})
.Pageable()
.Sortable()
.Scrollable(scr => scr.Height(350))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(15)
.ServerOperation(false)
)
)
I am cutting/pasting sample code from MVC grid control for local data. My IEnumerable list of data is populated into SearchResults. When I look at the HTML source, I see all the row and column data in the table, and repeated again in the kendoGrid() method as JSON. Not sure why it is repeated again here. What actually renders though, is that I see all the data in the grid flash for a millisecond on page load, but then it shows "No items to display" with empty grid. Obviously when it hits the kendoGrid() method, something goes wrong. If I add Deferred(true), then the grid is populated, but paging does an undesirable postback. So, why is the code populate both the HTML table, and the JSON passed to kendoGrid() method?
@(Html.Kendo().Grid(Model.SearchResults)
.Name("GridResults")
.Columns(columns =>
{
columns.Template(p => @Html.ActionLink("Edit", "Edit", new { Id = p.RecipeId }));
columns.Bound(p => p.ProductType).Title("Type");
columns.Bound(p => p.DisplayRecipeId).Title("Recipe ID").Width(130);
columns.Bound(p => p.RecipeName).Title("Recipe Name").Width(130);
columns.Bound(p => p.Status).Width(130);
columns.Bound(p => p.CreateDate).Title("Create Date");
columns.Bound(p => p.RevisedDate).Title("Revised Date");
})
.Pageable()
.Sortable()
.Scrollable(scr => scr.Height(350))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(15)
.ServerOperation(false)
)
)