I have a simple Grid in a MVC4 [ChildAction].
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.UserLoginID);
columns.Bound(p => p.UserName);
columns.Bound(p => p.UserStatus);
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("SearchUserResult_Read", "Search"))
)
)
How do I pass the Parent’s Model (Search Query Criteria) in the .Ajax() call above?
Note that I do pass the Parent’s Model to the Action via this code so have it in the Controller’s ChildAction, just not in the Ajax call:
@Html.Action("SearchUserResultGrid", "Search",
new {SearchQueryCriteriaViewModel = Model})
Found it:
Simply pass the model to the view:
Then in the Razor view