Looking at: http://demos.telerik.com/aspnet-mvc/Grid?theme=vista
Can anyone tell me what _FirstLook() is meant to return?
It is implementing the paging I think.
[GridAction]
public ActionResult _FirstLook()
{
return View(new GridModel(GetOrderDto()));
}
Every example I find calls a method GetOrders()
or GetOrderDto()
etc
Here is an example of that:
private IEnumerable<Order> GetOrders()
{
DataLoadOptions loadOptions = new DataLoadOptions();
loadOptions.LoadWith<Order>(o => o.Customer);
northwind.LoadOptions = loadOptions;
return northwind.Orders;
}
Am I just meant to provide a subset of the list based upon the page number clicked? How is the value transferred?
It appears all of this is using a design pattern that I am not which is why its not making sense.
I am using ADO.NET Entity Data Model not LINQ-SQL like I think this is using, so I don't have .LoadOptions
available. But surely I'm able to get this working using ADO.NET Entity Data Model rather than LINQ-SQL - it shouldn't matter?