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

Custom Transport

3 Answers 319 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 17 Aug 2014, 11:38 AM
I'm trying to use a custom transport. Using a grid, the transport methods are getting called. However, when I use DataSource.add(), the transport create method is not getting called. Is this a limitation? JSBin here: http://jsbin.com/xixamugasunu. Thanks.

3 Answers, 1 is accepted

Sort by
0
Accepted
Kiril Nikolov
Telerik team
answered on 18 Aug 2014, 11:57 AM
Hello Jay,

The create method will be called when the sync() of the dataSource is called. Please check the following example and let me know if it helps:

http://jsbin.com/xonov/1/edit

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jay
Top achievements
Rank 1
answered on 19 Aug 2014, 02:43 AM
Hi Kiril,

Thanks. I added sync() to my code but it still didn't work. I took a look at your example which does work and made the datasource standalone (mydatasource). I then referenced the datasource directly (instead of var dataSource =  $('#grid').getKendoGrid().dataSource). That broke it. The data is being added but the create function is not being called.

Updated jsBin here http://jsbin.com/buqekefufemi/1/edit.

Is there something else missing on my code? Or is the custom transport limited to the datagrid?

Thanks.
0
Jay
Top achievements
Rank 1
answered on 19 Aug 2014, 04:02 AM
Hi Kiril,

Please ignore the above. Both work. Something else is causing the problem. Probably the data parameter of the add.

Thanks.
Tags
Data Source
Asked by
Jay
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Jay
Top achievements
Rank 1
Share this question
or