Skip to content

Instantly share code, notes, and snippets.

@lohithgn
Created March 5, 2015 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lohithgn/d839fd507fe79cef5611 to your computer and use it in GitHub Desktop.
Save lohithgn/d839fd507fe79cef5611 to your computer and use it in GitHub Desktop.
allProductsData = new kendo.data.DataSource({
offlineStorage: productsStorageKey,
type: "odata",
transport: {
read: {
url: "http://services.odata.org/V2/Northwind/Northwind.svc/Products",
dataType: "jsonp",
}
},
schema:{
data:function(response)
{
var dataArray = null;
if(response.d){
dataArray = response.d.results;
}
else{
dataArray = response;
}
return dataArray;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment