Hi,
I need to extend the DataSource with a new method.
If I create a new datasource like this:
var myDatasource = new kendo.data.DataSource(.....);
I want to do like this:
myDatasource.myCustomMethod();
How can I extend Datasource with the new method myCustomMethod?
I tried something like this:
$.extend(true, kendo.data.DataSource, {
myCustomMethod: function() {
alert('hello from custom method');
}
});
But it does not work. Please help.
I need to extend the DataSource with a new method.
If I create a new datasource like this:
var myDatasource = new kendo.data.DataSource(.....);
I want to do like this:
myDatasource.myCustomMethod();
How can I extend Datasource with the new method myCustomMethod?
I tried something like this:
$.extend(true, kendo.data.DataSource, {
myCustomMethod: function() {
alert('hello from custom method');
}
});
But it does not work. Please help.