I am currently using jqgrid on asp.net mvc and we have a rather slow network (internal application) and it seems to load the grid for a long time (the problem is both in the network and in parsing, rendering)
I am trying to determine how to minimize what I send to the client in order to make it as fast as possible.
The following is a simplified view of my controller action for loading data into a grid:
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult GridData1(GridData args)
{
var paginatedData = applications.GridPaginate(args.page ?? 1, args.rows ?? 10,
i => new
{
i.Id,
Name = "<div class='showDescription' id= '" + i.id+ "'>" + i.Name + "</div>",
MyValue = GetImageUrl(_map, i.value, "star"),
ExternalId = string.Format("<a href=\"{0}\" target=\"_blank\">{1}</a>",
Url.Action("Link", "Order", new { id = i.id }), i.Id),
i.Target,
i.Owner,
EndDate = i.EndDate,
Updated = "<div class='showView' aitId= '" + i.AitId + "'>" + GetImage(i.EndDateColumn, "star") + "</div>",
})
return Json(paginatedData);
}
So, I collect json data (I have about 200 entries above) and send it back to the GUI to insert jqgrid.
, , . json- HTML "". HTML . , , "" HTML . ? HTML (divs ..).
, - , , . , - , .