Last active
August 29, 2015 14:03
-
-
Save lohithgn/529f38c914c352204a1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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