Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
570
xml grid problem iterateNext error
posted

Trying to port an older extjs grid over to jquery igGrid using ajax local webservice call and returning xml. Goal is to eventually get the paging to work but for now I"m having trouble getting it to display my return. I think the xml looks fine in the response but I get this error via  Chrome debugger:

 Uncaught Error: There was an error parsing the XML data and applying the defined data schema: Object #<Document> has no method 'iterateNext' infragistics.js:51

I have 

contentType:

 

 

 

'text/xml; charset=utf-8', dataType: 'xml' when the response is returned I have var obj = msg and then I recreate the grid with dataSourceType: 'xml' and dataSource: obj

Please help I really want to get this to work. I refuse to return json. IMHO its a pain in the *** to get it to parse correctly especially between chrome and ie. been there done that. This is all from a grid that was working fine in extjs so I think my xml and request/response ajax pattern should be OK!

Parents
  • 570
    posted

    Could I be missing this sort of loader schema setup somewhere? The service does return XmlDocument rather than a string. Is there an easier construct for this? I don't understand the loader business...having trouble finding a complete example for this. I  am using the latest 2012.1 version NetAdvantage Ultimate.

     

     $.ig.loader(function () {
                var xmldoc,
                    lang = '<%= ViewData["lang"] %>',
                    productSchema,
                    modifiedDateXPath = (lang === 'en') ? "modifiedDate" : "modifiedDateJP",
                    xmldoc = loadXMLDoc("/SamplesBrowser/SamplesCommon/jQuery/DataSource/XML.WithNSes.20.Pretty.Printed.xml");

                xmlSchema = new $.ig.DataSchema("xml", { fields: [
                    { name: "contactID", xpath: "contactID", type: "number" },
                    { name: "emailAddress", xpath: "emailAddress", type: "string" },
                    { name: "firstName", xpath: "firstName", type: "string" },
                    { name: "lastName", xpath: "lastName", type: "string" },
                    { name: modifiedDateXPath, xpath: modifiedDateXPath}],
                    searchField: "PimpedPersonContactProxy"
                });

                ds = new $.ig.DataSource({ type: "xml", dataSource: xmldoc, schema: xmlSchema });
                ds.dataBind();

  • 49378
    posted in reply to thomcat23

    Hi lwolhar,

    Thank you for posting in the community.

    I assume that the code posted above is from our documentation article regarding setting up an igDataSource from XML:

    http://help.infragistics.com/NetAdvantage/jQuery/2012.1/CLR4.0?page=igDataSource_Binding_to_XML.html

    A useful general guide regarding the use of igDataSource's data schema can be found at:

    http://help.infragistics.com/Help/NetAdvantage/jQuery/2012.1/CLR4.0/html/igDataSource_Using_DataSchema.html

    Regarding your specific scenario I would be glad to provide more specific feedback if you can provide me with some information regarding the overall structure of your xml (perhaps some dummy data).

    Please do not hesitate to contact me if you have any questions.

     

Reply Children