I've been having several problems the last few days when it comes to paging data from a grid. I have a webform that when the user submits goes to the controller where I am calling a stored procedure from a database and passing it 2 parameters. The stored proc then returns several columns and hundreds of rows back. This is then passed into a LINQ in my controller that parses out the information based on certain attributes the user selected. I then pass this information into a view. When the view is released I am getting a full grid with all the information along with pages to tab through. That's where the issue is. The minute I click on a page it refreshes the page and now the grid has no information whatsoever on it. Here is the code:
Controller:
public ActionResult Results( All the webform parameters are being passed in here )
var model = db.StoredProcedure(startDate, endDate)
//LINQ query is here
.Take(1000)
.Select(r => new LINQS
{
//Selects the data that I want
});
return View("Results", model.ToList());
View:
//A bunch of non relatable html
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Pageable()
.Scrollable()
.Filterable()
.Groupable()
)
Controller:
public ActionResult Results( All the webform parameters are being passed in here )
var model = db.StoredProcedure(startDate, endDate)
//LINQ query is here
.Take(1000)
.Select(r => new LINQS
{
//Selects the data that I want
});
return View("Results", model.ToList());
View:
//A bunch of non relatable html
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Pageable()
.Scrollable()
.Filterable()
.Groupable()
)