[Site.js]
$("#Grid").ejGrid({
dataSource: dm,
allowScrolling: true,
---
pageSettings: { enableQueryString: true, pageSize: 10 },
columns: [
{ field: "value", headerText: "ID", isPrimarykey: true },
{ field: "data", headerText: "Email" },
],
actionBegin: function (args) {
args.model.query.addParams("ID", 10248);
}
});
----------------------------------------------
[HomeContrller.cs]
public class Test : DataManager //inherit the class to show age as property of DataManager
{
public int ID { get; set; }
}
public IActionResult Get([FromBody]Test dm)
{
var data = new[]
{
---
};
IEnumerable Data = data.ToList();
DataOperations operation = new DataOperations();
---
return Json(new { result = Data, count = count });
}
|