Using viewmodelpage in read action

2 posts, 0 answers
  1. Houssem
    Houssem avatar
    4 posts
    Member since:
    Jul 2015

    Posted 03 Sep 2015 Link to this post


    I need to use my viewmodelpage in my read action of kendo mvc grid. This my codes :


     VolViewModel model;

    public ActionResult Index()
    model = new VolViewModel { Item = new List<Vol>() };
    model.Item = _volBusiness.GetAllVol();
    return View(model);

    public ActionResult Read([DataSourceRequest]DataSourceRequest request)
    var result = model.Item;
    return Json(result.ToDataSourceResult(request));



    .DataSource(dataSource => dataSource
    .Model(model =>
    model.Id(m => m.VolId);
    .Read(read => read.Action("Read", "Vol")



  2. Viktor Tachev
    Viktor Tachev avatar
    2291 posts

    Posted 07 Sep 2015 Link to this post

    Hello Houssem,

    Note that you should specify the exact name of the action and the controller. Check out the following article for illustration:

    Viktor Tachev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top