.&1|?" {}:+dt 4BEn!3_${E6|TI ] Z\U͡]Smw% CRJhJC Zо_[45RP_@V}wJ߭RXFʡGP6,OU-]=Ryߣjux W@zr?`B}ĽTA|>Nq4},Z=KٺEf|s Z6J,qwK۰^VsEmVIsϒ*2cuDQ(ޙˣoe@%J aL {lq33 l` ٳֲIp.[ۺ^+܀VIN(v791ZC2^v0VNy:dՃ$Uu:`t&W ;(Yw2m *])6"+3Z5ٜcn}~\SعSu޸­7$#oP-cu要OTlFw1?4"/e!ˡ[ gc㻫S5-J&!B'o1:`uABjGZ~Y7ߢ90OaC늆hUBh$ޡJ߄2V=uHuj4 IV(P)MܽiF*/E2BFtouY]CvJPlnϤ7B@*ڒi4'$S:\jlCB&<-5).E2,Jsig&.}<1* ٨q07G|яB5-s";Ax>DS?Avb?ܠ_uhg4Njvɀ;Քhe_wM~:VŽ7Ρl UtI ^BR1N}I՗>Zܦ# Ngq9yo^ˉMp|H`ݠ)z&zœ>;Θ|> tzpQ KIVG8uqgyJyS"\$M}=u&RYR7܁<奵*kBLOG -{$ gQLczQDQP^NΆ* h4_Lujj28nn&,`\f#BOДy#8nn&,`\fW<^JĠ#-,@&\}K;8nn&,`\f俋bgP:Pd8z1!)Qpf"ڏgO^`t+Ҧ,Y4:uBB:8nn&,`\f4wCZװnR 襲=D % eyA7vH籶or;K s)ǞR}Dto|,s]&Z|Hb&kj*}uAxo""-cFCĶ8nn&,`\f"资&}H?plP } _vDN7h Qw޼IXNR?i兔`NOpr~tŞ2. a'0++<;@%]a.,7rFh var employeesSource =
{
datatype: "xml",
datafields: [
{ name: 'FirstName', type: 'string' },
{ name: 'LastName', type: 'string' }
],
root: "Employees",
record: "Employee",
id: 'EmployeeID',
url: "../sampledata/employees.xml",
async: false
};
var employeesAdapter = new $.jqx.dataAdapter(employeesSource, {
autoBind: true,
beforeLoadComplete: function (records) {
var data = new Array();
// update the loaded records. Dynamically add EmployeeName and EmployeeID fields.
for (var i = 0; i < records.length; i++) {
var employee = records[i];
employee.EmployeeName = employee.FirstName + " " + employee.LastName;
employee.EmployeeID = employee.uid;
data.push(employee);
}
return data;
}
});
// prepare the data
var ordersSource =
{
datatype: "xml",
datafields: [
// name - determines the field's name.
// value - the field's value in the data source.
// values - specifies the field's values.
// values.source - specifies the foreign source. The expected value is an array.
// values.value - specifies the field's name in the foreign source.
// values.name - specifies the field's value in the foreign source.
// When the ordersAdapter is loaded, each record will have a field called "EmployeeName". The "EmployeeName" for each record comes from the employeesAdapter where the record's "EmployeeID" from orders.xml matches to the "EmployeeID" from employees.xml.
{ name: 'EmployeeName', value: 'EmployeeID', values: { source: employeesAdapter.records, value: 'EmployeeID', name: 'EmployeeName' } },
{ name: 'EmployeeID', map: 'm\\:properties>d\\:EmployeeID' },
{ name: 'ShippedDate', map: 'm\\:properties>d\\:ShippedDate', type: 'date' },
{ name: 'Freight', map: 'm\\:properties>d\\:Freight', type: 'float' },
{ name: 'ShipName', map: 'm\\:properties>d\\:ShipName' },
{ name: 'ShipAddress', map: 'm\\:properties>d\\:ShipAddress' },
{ name: 'ShipCity', map: 'm\\:properties>d\\:ShipCity' },
{ name: 'ShipCountry', map: 'm\\:properties>d\\:ShipCountry' }
],
root: "entry",
record: "content",
id: 'm\\:properties>d\\:OrderID',
url: "../sampledata/orders.xml",
pager: function (pagenum, pagesize, oldpagenum) {
// callback called when a page or page size is changed.
}
};
var ordersAdapter = new $.jqx.dataAdapter(ordersSource);
employees.xml
<?xml version="1.0"?>
<Employees>
<Employee EmployeeID="5">
<LastName>Buchanan</LastName>
<FirstName>Steven</FirstName>
<Title>Sales Manager</Title>
<TitleOfCourtesy>Mr.</TitleOfCourtesy>
<BirthDate>1955-03-04</BirthDate>
<HireDate>1993-10-17</HireDate>
<Address>14 Garrett Hill</Address>
<City>London</City>
<Region/>
<PostalCode>SW1 8JR</PostalCode>
</Employee>
<Employees>
orders.xml
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<feed xml:base="http://services.odata.org/Northwind/Northwind.svc/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
<title type="text">Orders</title>
<id>http://services.odata.org/Northwind/Northwind.svc/Orders</id>
<updated>2011-12-01T11:55:06Z</updated>
<link rel="self" title="Orders" href="Orders" />
<entry>
<id>http://services.odata.org/Northwind/Northwind.svc/Orders(10248)</id>
<title type="text"></title>
<updated>2011-12-01T11:55:06Z</updated>
<author>
<name />
</author>
<link rel="edit" title="Order" href="Orders(10248)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Customer" type="application/atom+xml;type=entry" title="Customer" href="Orders(10248)/Customer" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Employee" type="application/atom+xml;type=entry" title="Employee" href="Orders(10248)/Employee" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Order_Details" type="application/atom+xml;type=feed" title="Order_Details" href="Orders(10248)/Order_Details" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Shipper" type="application/atom+xml;type=entry" title="Shipper" href="Orders(10248)/Shipper" />
<category term="NorthwindModel.Order" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/xml">
<m:properties>
<d:OrderID m:type="Edm.Int32">10248</d:OrderID>
<d:CustomerID>VINET</d:CustomerID>
<d:EmployeeID m:type="Edm.Int32">5</d:EmployeeID>
<d:OrderDate m:type="Edm.DateTime">1996-07-04T00:00:00</d:OrderDate>
<d:RequiredDate m:type="Edm.DateTime">1996-08-01T00:00:00</d:RequiredDate>
<d:ShippedDate m:type="Edm.DateTime">1996-07-16T00:00:00</d:ShippedDate>
<d:ShipVia m:type="Edm.Int32">3</d:ShipVia>
<d:Freight m:type="Edm.Decimal">32.3800</d:Freight>
<d:ShipName>Vins et alcools Chevalier</d:ShipName>
<d:ShipAddress>59 rue de l'Abbaye</d:ShipAddress>
<d:ShipCity>Reims</d:ShipCity>
<d:ShipRegion m:null="true" />
<d:ShipPostalCode>51100</d:ShipPostalCode>
<d:ShipCountry>France</d:ShipCountry>
</m:properties>
</content>
</entry>
</feed>
data Object {} datatype String String type String "GET" id String "" localdata Array or String [] mapChar String ">" rowDelimiter String "\n" root String "" record String "" url String ""

settings

async Boolean true autoBind Boolean false beforeSend function null beforeLoadComplete function null contentType String "application/x-www-form-urlencoded" formatData function null loadError function null loadComplete function null loadServerData function null processData function null

Methods and Properties

beginUpdate function dataBind function endUpdate function formatDate function formatNumber function getRecordsHierarchy function getGroupedRecords function getGroupedRecords function getAggregatedData function records Array []