Edit this page

transport.signalr Object

The configuration used when type is set to "signalr". Configures the SignalR settings - hub, connection promise, server, and client hub methods.

Live demo available at demos.telerik.com/kendo-ui.

It is recommended to get familiar with the SignalR JavaScript API.

Example

<script src="http://ajax.aspnetcdn.com/ajax/signalr/jquery.signalr-1.1.3.min.js"></script>
<script>
    var hubUrl = "https://demos.telerik.com/kendo-ui/service/signalr/hubs";
    var connection = $.hubConnection(hubUrl, { useDefaultPath: false});
    var hub = connection.createHubProxy("productHub");
    var hubStart = connection.start({ jsonp: true });

    var dataSource = new kendo.data.DataSource({
        type: "signalr",
        schema: {
            model: {
                id: "ID",
                fields: {
                    "ID": { editable: false, nullable: true },
                    "CreatedAt": { type: "date" },
                    "UnitPrice": { type: "number" }
                }
            }
        },
        transport: {
            signalr: {
                promise: hubStart,
                hub: hub,
                server: {
                    read: "read",
                    update: "update",
                    destroy: "destroy",
                    create: "create"
                },
                client: {
                    read: "read",
                    update: "update",
                    destroy: "destroy",
                    create: "create"
                }
            }
        }
    });
</script>

transport.signalr.client Object

Specifies the client-side CRUD methods of the SignalR hub.

transport.signalr.client.create String

Specifies the name of the client-side method of the SignalR hub responsible for creating data items.

transport.signalr.client.destroy String

Specifies the name of the client-side method of the SignalR hub responsible for destroying data items.

transport.signalr.client.read String

Specifies the name of the client-side method of the SignalR hub responsible for reading data items.

transport.signalr.client.update String

Specifies the name of the client-side method of the SignalR hub responsible for updating data items.

transport.signalr.hub Object

The SignalR hub object returned by the createHubProxy method. The hub option is mandatory.

transport.signalr.promise Object

The promise returned by the start method of the SignalR connection. The promise option is mandatory.

transport.signalr.server Object

Specifies the server-side CRUD methods of the SignalR hub.

transport.signalr.server.create String

Specifies the name of the server-side method of the SignalR hub responsible for creating data items.

transport.signalr.server.destroy String

Specifies the name of the server-side method of the SignalR hub responsible for destroying data items.

transport.signalr.server.read String

Specifies the name of the server-side method of the SignalR hub responsible for reading data items.

transport.signalr.server.update String

Specifies the name of the server-side method of the SignalR hub responsible for updating data items.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy