Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var partnersModel=(function(){
var partnerModel ={
id:"BusinessPartnerID",
fields:{
Company:{field:'CompanyName'},
Email:{field:'EmailAddress'},
Phone:{field:'PhoneNumber'},
Fax:{field:'FaxNumber'},
Web:{field:'WebAddress'},
LegalForm:{field:'LegalForm'},
Currency:{field:'CurrencyCode'},
City:{field:'City'},
PostalCode:{field:'PostalCode'},
Street:{field:'Street'},
Building:{field:'Building'},
Country:{field:'Country'},
}
};
var partnersDataSource = new kendo.data.DataSource({
type:'odata',
transport:{
read:{
url:function(){
return appSettings.dataSettings.partnersReadUrl;
},
dataType:"json",
},
},
sort: {
field: "CompanyName",
dir: "asc"
},
schema: {
model: partnerModel
},
pageSize:50,
serverPaging:true,
serverSorting: true,
});
return {
partners: partnersDataSource
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.