Version

GridDataSourceActionAttribute Class

this is an attribute class which extends the mvc FilterAttribute. It should be put on top of the controller method that should return JSON (even though in the user code it will return Action Result). The idea of this filter is to transform the ActionResult into a JsonResult instance, taking into account all Request params such as paging, sorting, and filtering. Since MVC doesn't have ViewState, we will need to infer all the features from the request itself, that's the only information we have regarding any previous state.
Syntax
'Declaration
 
Public Class GridDataSourceActionAttribute 
   Inherits System.Web.Mvc.FilterAttribute
public class GridDataSourceActionAttribute : System.Web.Mvc.FilterAttribute 
Requirements

Target Platforms: Windows 8.1, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

View on GitHub