Hi,
sorry if I am posting question that is maybe answered somewhere else, but I searched and didn't find anything.
I know it is possible to use WebSocket as dataSource on grid as shown on one of your examples, but wanted to check if it's possible to use web socket as DS on gantt and if yes, will it behave the same way as grid in terms of updates etc.
Thank you
4 Answers, 1 is accepted
The WebSocket binding demo available for the Grid shows a full DataSource customization. https://demos.telerik.com/kendo-ui/grid/web-socket
As the transport methods are defined as functions every aspect of the DataSource is under the control of the logic implemented. That means that every widget (plus the Gantt) will work as required with the customized DataSource implemented. Shortly, following the same techniques should work for the Gantt to.
Regards,
Ianko
Progress Telerik

Hi Ianko,
Thank you very much for a prompt response. I will try it.
Regards,
Vedad

Hi Ianko,
I managed to connect gantt to the webSocket, but I run onto strange behavior which is kind of confusing.
For testing purposes I set webSocket to return exactly the same response as service originally used, but for some reason, function originalFunction used in wrapDataAccess, exactly the same input treats differently.
With original service call, on bolded line below, response object which contains array of gantt elements is transformed into array and parsed properly, but when webSocket returns exactly the same response (I even copied that response and even hard-coded webSocket to return it), it creates a new array and places my object as one of the properties within.
function wrapDataAccess(originalFunction, model, converter, getters, originalFieldNames, fieldNames) {
return function (data) {
data = originalFunction(data);
return wrapDataAccessBase(model, converter, getters, originalFieldNames, fieldNames)(data);
};
}
Any idea/suggestions why? :)
Thanks and regards,
Vedad

I figured out why, because there is custom transport built for this part I didn't know about.
:)