Skip to content

DataSource

DataSource configuration:

.DataSource(ds => ds
    .URL(Url.Action("GetDataResult"))
    .Method("POST"))

URL

Set data source URL.

.URL("/Home/GetAll")

Method

Set Ajax Http method.

.Method("POST")

Data

Passing additional data to action and set the name of javascript function.

.Data("addParam")
function addParam() {
   return { param1: "test1", param2: true, param3: 5 };
}

Get parameters with object named "data".

public JsonResult GetAll(DataRequest request, AddData data)
{
    //
}

Naming

Set naming convention strategy. If not set uses default.

.Naming(Convention.CamelCase)