Are there any examples for loading data into the footer? I can\'t find any or I\'m being blocked at work.
Thanks in advance...
The answer above helps a lot. Anyway here is the way I did it in MVC.Net:
First this attributes over the grid definition:
footerrow: true, userDataOnFooter: true
In the action result on the HttpPost:
[HttpPost]
public ActionResult GetNewMembersByDate(string date1, string date2)
{
List list =_reportsRepository.GetNewByDate(DateTime.Parse(date1), DateTime.Parse(date2));
var amount = from p in list
select p.Quantity;
var jsonData = new
{
total = 1,
page = 1,
records = list.Count(),
userdata = new
{
Name = "Total:",
Quantity= amount.Sum().ToString()
},
rows = (
from row in list
select new
{
i = row.RowNumber,
cell = new[] {
row.RowNumber.ToString(),
row.Name,
row.Quantity.ToString()
}
}).ToArray()
};
return Json(jsonData);
}