What is the difference between this line:
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ClientOrderViewModel>()
and this line:
@(Html.Kendo().Grid(Model)
I thought the first one is if you are connecting to a remote datasource. I tried the first one and it only seems to work if you are using json. I'm using the second and it is working for me.
Here is what my controller code looks like that works with the 2nd one and not the first.
public ActionResult Index(string classifications = "")
{
ViewData["Category"] = classifications;
ViewData["Classifications"] = new SelectList(Classifications.List, "ClassificationText", "ClassificationText", classifications);
var codModels = new List<
CodeModel
>();
ViewBag.SelectedCatgory = classifications ?? "Type";
if (Request.HttpMethod == "POST")
{
var model = _codeRepository.Search(classifications).ToModel();
return View(model);
}
return View(codModels);
}