dhtmlxGrid: loading data from web service

I’m trying to get dhtmlxGrid to load data from a .net web service. The data is formatted the way dhtmlxGrid wants it, but I cannot make the actual loading from the service work.
*** mygrid.load(“dbLink.asmx/getProducts_RawXml”); ***

If I save the output of the service in a file and tries to populate the grid with that, it works just fine.
*** mygrid.loadXML(“xmlFiles/products.xml”); ***

Normally the web service would return a bit of namespaces etc. as well, but I have stripped all this using Context.Response.Output.Write() to return the raw XML that is build within the WebMethod I’m calling.
Whether or not there is supposed to be set some kind of header like “Content-Type: text/xml” with Context.Respose too I’m not sure - I have tried but with no luck.

Anyone can tell me how to make a WebMethod in a .net web service return in a way that dhtmlGrid will accept for the grid.loadXML() function?

PS. Oh, by the way, the error I’m getting is the javascript alert “Error Type: loadXML - Description: Incorrect XML”.

/Aidal

“Error Type: loadXML - Description: Incorrect XML”.
Such error may occur if xml which you try to load is incorrect. Please find more information here docs.dhtmlx.com/doku.php?id=dhtm … leshooting

Also you can try to use dhtmlxConnector for .Net extension. dhtmlxConnector is a set of .NET classes which helps to simplify server side operations related to dhtmlx library components (dhtmlxGrid/TreeGrid, dhtmlxTree, dhtmlxCombo). You can find more information here docs.dhtmlx.com/doku.php?id=dhtm … tornet:toc

Well I know that the XML is correctly formatted because as stated, if I save the output to a file I can load that successfully. I’m thinking it is a header problem or something like that.

I will take a look at the dhtmlxConnector, although I would prefer not having to be in contact with a database directly for scalability and realocationing.

I’m trying to use the dhtmlxConnector but I cannot find the .net files needed to inherit from the dhtmlxRequestHandler class.
I’ve only been able to locate files and samples for PHP, not .net.

I’m currently evaluating the product to see if it is something we can use for some upcomming projects, so it is the free version I’m using - Are these files not available for this version?

If not, it is hard to evaluate the product…

If I save the output of the service in a file and tries to populate the grid with that, it works just fine.

As for original issue - it can be caused by content-type , it must be text/xml, also it may be important that there is no extra output before <?xml declaration

As for .net connectors
Package can be taken from
dhtmlx.com/docs/download/dhtmlxConnector_net.zip

Great thing this forum reminded me that I temporarily removed the header part :slight_smile: Now the method loadXML loads my web service xml data …

Many thanks …