Kendo UI grid widget XML data source content not displayed -
i bit knew kendo stuff hence seeking help. trying display kendo grid using xml data. rows of grid shown empty.i trying fetch data url(http://demos.kendoui.com/service/northwind.svc/products) , set data source on kendo widget. once run sample (http://jsfiddle.net/visibleinvisibly/c3qsdjq0/19/) shows empty grid. believe happening not able set "data" property in "schema" object of datasource.i wouldnt use json sample
below sample xml data
<feed xml:base="http://demos.telerik.com/kendo-ui/service/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"> ............................. ........................... <entry> .................. .................... <content type="application/xml"> <m:properties> <d:productid m:type="edm.int32">1</d:productid> <d:productname>chai</d:productname> <d:unitprice m:type="edm.decimal">18.00</d:unitprice> </m:properties> </content> </entry> </feed>
the data property in schema set this
schema: { type: "xml", data: "/feed/entry/content/properties", model: { fields: { productid: "productid/text()", productname: "productname/text()", unitprice: "unitprice/text()" } } }
thanks in advance,
alex.
@alex - below analysis -
point no.1 - data not displayed
when try run jsfiddle sample (http://jsfiddle.net/visibleinvisibly/c3qsdjq0/19/) in chrome, below error in console -
"xmlhttprequest cannot load http://demos.kendoui.com/service/northwind.svc/products?take=10&skip=0&page=1&pagesize=10. no 'access-control-allow-origin' header present on requested resource. origin 'http://fiddle.jshell.net' therefore not allowed access."
this indicates why content not displayed in kendo ui grid.
point no. 2 - using xml
i tried use xml type using angularjs , got below error-
"unknown datasource transport type 'xml'. verify registration scripts type included after kendo ui on page."
i believe, means xml datasource transport type cannot used. have rely on json or odaata.
hope help!
cheers sanket
Comments
Post a Comment