<kendo:dataSource-transport>

The configuration used to load and save the data items. A data source is remote or local based on the way it retrieves data items.Remote data sources load and save data items from and to a remote end-point (also known as remote service or server). The transport option describes the remote service configuration - URL, HTTP verb, HTTP headers, and others. The transport option can also be used to implement custom data loading and saving.Local data sources are bound to a JavaScript array via the data option.

Example

<kendo:dataSource>
    <kendo:dataSource-transport></kendo:dataSource-transport>
</kendo:dataSource>

Configuration Attributes

cache boolean

Specifies if the transport caches the result from read requests. The query parameters are used as a cache key and if the key is present in the cache, a new request to the server is not executed. The cache is kept in memory and, thus, cleared on page refresh.

Example

<kendo:dataSource-transport cache="cache">
</kendo:dataSource-transport>

create java.lang.String

The configuration used when the data source saves newly created data items. Those are items added to the data source via the add or insert methods.If the value of transport.create is a function, the data source invokes that function instead of jQuery.ajax. Check the jQuery documentation for more details on the provided argument.If the value of transport.create is a string, the data source uses this string as the URL of the remote service. Further configuration is available via kendo:dataSource-transport-create.

Example

<kendo:dataSource-transport create="create">
</kendo:dataSource-transport>

destroy java.lang.String

The configuration used when the data source destroys data items. Those are items removed from the data source via the remove method.If the value of transport.destroy is a function, the data source invokes that function instead of jQuery.ajax.If the value of transport.destroy is a string, the data source uses this string as the URL of the remote service. Further configuration is available via kendo:dataSource-transport-destroy.

Example

<kendo:dataSource-transport destroy="destroy">
</kendo:dataSource-transport>

parameterMap java.lang.String

The function which converts the request parameters to a format suitable for the remote service. By default, the data source sends the parameters using jQuery conventions.If a transport.read.data function is used together with parameterMap, remember to preserve the result from the data function that will be received in the parameterMap arguments. An example is provided below. Generally, the parameterMap function is designed to transform the request payload, not to add new parameters to it.

Example

<kendo:dataSource-transport parameterMap="parameterMap">
</kendo:dataSource-transport>

push java.lang.String

The function invoked during transport initialization which sets up push notifications. The data source will call this function only once and provide callbacks which will handle push notifications (data pushed from the server).

Example

<kendo:dataSource-transport push="push">
</kendo:dataSource-transport>

read java.lang.String

The configuration used when the data source loads data items from a remote service.If the value of transport.read is a function, the data source invokes that function instead of jQuery.ajax.If the value of transport.read is a string, the data source uses this string as the URL of the remote service. Further configuration is available via kendo:dataSource-transport-read.

Example

<kendo:dataSource-transport read="read">
</kendo:dataSource-transport>

submit java.lang.String

A function that will handle create, update and delete operations in a single batch when custom transport is used, that is, the transport.read is defined as a function.The transport.create, transport.update, and transport.delete operations will not be executed in this case.

Example

<kendo:dataSource-transport submit="submit">
</kendo:dataSource-transport>

update java.lang.String

The configuration used when the data source saves updated data items. Those are data items whose fields have been updated.If the value of transport.update is a function, the data source invokes that function instead of jQuery.ajax.If the value of transport.update is a string, the data source uses this string as the URL of the remote service. Further configuration is available via kendo:dataSource-transport-update.

Example

<kendo:dataSource-transport update="update">
</kendo:dataSource-transport>

Configuration JSP Tags

kendo:dataSource-transport-batch

The object can contain all the available jQuery.ajax options.

More documentation is available at kendo:dataSource-transport-batch.

Example

<kendo:dataSource-transport>
    <kendo:dataSource-transport-batch></kendo:dataSource-transport-batch>
</kendo:dataSource-transport>

kendo:dataSource-transport-create

The configuration used when the data source saves newly created data items. Those are items added to the data source via the add or insert methods.If the value of transport.create is a function, the data source invokes that function instead of jQuery.ajax. Check the jQuery documentation for more details on the provided argument.If the value of transport.create is a string, the data source uses this string as the URL of the remote service.

More documentation is available at kendo:dataSource-transport-create.

Example

<kendo:dataSource-transport>
    <kendo:dataSource-transport-create></kendo:dataSource-transport-create>
</kendo:dataSource-transport>

kendo:dataSource-transport-destroy

The configuration used when the data source destroys data items. Those are items removed from the data source via the remove method.If the value of transport.destroy is a function, the data source invokes that function instead of jQuery.ajax.If the value of transport.destroy is a string, the data source uses this string as the URL of the remote service.

More documentation is available at kendo:dataSource-transport-destroy.

Example

<kendo:dataSource-transport>
    <kendo:dataSource-transport-destroy></kendo:dataSource-transport-destroy>
</kendo:dataSource-transport>

kendo:dataSource-transport-read

The configuration used when the data source loads data items from a remote service.If the value of transport.read is a function, the data source invokes that function instead of jQuery.ajax.If the value of transport.read is a string, the data source uses this string as the URL of the remote service.

More documentation is available at kendo:dataSource-transport-read.

Example

<kendo:dataSource-transport>
    <kendo:dataSource-transport-read></kendo:dataSource-transport-read>
</kendo:dataSource-transport>

kendo:dataSource-transport-update

The configuration used when the data source saves updated data items. Those are data items whose fields have been updated.If the value of transport.update is a function, the data source invokes that function instead of jQuery.ajax.If the value of transport.update is a string, the data source uses this string as the URL of the remote service.

More documentation is available at kendo:dataSource-transport-update.

Example

<kendo:dataSource-transport>
    <kendo:dataSource-transport-update></kendo:dataSource-transport-update>
</kendo:dataSource-transport>

Event Attributes

parameterMap String

The function which converts the request parameters to a format suitable for the remote service. By default, the data source sends the parameters using jQuery conventions.If a transport.read.data function is used together with parameterMap, remember to preserve the result from the data function that will be received in the parameterMap arguments. An example is provided below. Generally, the parameterMap function is designed to transform the request payload, not to add new parameters to it.

Example

<kendo:dataSource-transport parameterMap="handle_parameterMap">
</kendo:dataSource-transport>
<script>
    function handle_parameterMap(e) {
        // Code to handle the parameterMap event.
    }
</script>

push String

The function invoked during transport initialization which sets up push notifications. The data source will call this function only once and provide callbacks which will handle push notifications (data pushed from the server).

Example

<kendo:dataSource-transport push="handle_push">
</kendo:dataSource-transport>
<script>
    function handle_push(e) {
        // Code to handle the push event.
    }
</script>

submit String

A function that will handle create, update and delete operations in a single batch when custom transport is used, that is, the transport.read is defined as a function.The transport.create, transport.update, and transport.delete operations will not be executed in this case.

Example

<kendo:dataSource-transport submit="handle_submit">
</kendo:dataSource-transport>
<script>
    function handle_submit(e) {
        // Code to handle the submit event.
    }
</script>

Event Tags

kendo:dataSource-transport-parameterMap

The function which converts the request parameters to a format suitable for the remote service. By default, the data source sends the parameters using jQuery conventions.If a transport.read.data function is used together with parameterMap, remember to preserve the result from the data function that will be received in the parameterMap arguments. An example is provided below. Generally, the parameterMap function is designed to transform the request payload, not to add new parameters to it.

Example

<kendo:dataSource-transport>
    <kendo:dataSource-transport-parameterMap>
        <script>
            function(e) {
                // Code to handle the parameterMap event.
            }
        </script>
    </kendo:dataSource-transport-parameterMap>
</kendo:dataSource-transport>

kendo:dataSource-transport-push

The function invoked during transport initialization which sets up push notifications. The data source will call this function only once and provide callbacks which will handle push notifications (data pushed from the server).

Example

<kendo:dataSource-transport>
    <kendo:dataSource-transport-push>
        <script>
            function(e) {
                // Code to handle the push event.
            }
        </script>
    </kendo:dataSource-transport-push>
</kendo:dataSource-transport>

kendo:dataSource-transport-submit

A function that will handle create, update and delete operations in a single batch when custom transport is used, that is, the transport.read is defined as a function.The transport.create, transport.update, and transport.delete operations will not be executed in this case.

Example

<kendo:dataSource-transport>
    <kendo:dataSource-transport-submit>
        <script>
            function(e) {
                // Code to handle the submit event.
            }
        </script>
    </kendo:dataSource-transport-submit>
</kendo:dataSource-transport>
In this article
Not finding the help you need?