This is a migrated thread and some comments may be shown as answers.

Kendo Datasource SignalR

1 Answer 227 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 21 Sep 2017, 07:13 AM
Hello,

I want to build a KendoUi DataSource with SignalR. I looked at many examples, but what I don’t understand is where the client crud methods are defined.

    transport: {
        signalr: {
            promise: hubStart,
            hub: hub,
            server: {
                read: "read",
                update: "update",
                destroy: "destroy",
                create: "create"
            },
            client: {
                read: "read",
                update: "update",
                destroy: "destroy",
                create: "create"
            }

Is there any documentation about this interface?


In the examples the Server methods called with parameter:
        public void Update(ProductSignalR product)

Where happens all this stuff? Could you explain me the logical relationship?

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 25 Sep 2017, 06:41 AM
Hello, Jan,

I can suggest checking the following article describing the specifics when binding the Grid to a SignalR Hub. It provides an information for the client Hub methods:

https://blog.falafel.com/use-signalr-kendo-ui/

"The “server” CRUD actions map to SignalR Hub method names. You do not need to map all if they aren’t going to be used.
The “client” CRUD actions map to what the SignalR Hub thinks the client function names are. You do not need to map all if they aren’t going to be used.
The corresponding SignalR Hub for this DataSource may resemble the following:
Notice that for Update, Create, and Destroy, the Hub uses “Client.Others.{action}” to push the updated entity to all other clients who are currently connected to this Hub.  The “{action}” name here is what must be mapped in the transport.signalr.client options of the DataSource.
"

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Jan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or