Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by U.Janki Rao on Apr 08, 2008 02:55
open dhtmlx forum
dhtml grid

i m working on dhtml grid on trial basis so i am not using professional version
mygrid.parseXML() and mygrid.loadXmlString()
the above functions are not working.wi'll these functionally work on professional edition....?
or am i missing some thing else

my code is below

function showxmlGrid(Container)
    {
    
        var xmlString ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
            xmlString +=    "<rows>"
            xmlString +=    " <row id=\"1\">"
            xmlString +=    " <cell>1</cell>"
            xmlString +=             "<cell>Colour M</cell>"
            xmlString +=    "         <cell>651</cell>"
            xmlString +=    "         </row>"
            xmlString +=    "         <row id=\"2\">"
            xmlString +=    "         <cell>2</cell>"
            xmlString +=    "         <cell>Colour k </cell>"
            xmlString +=    "         <cell>652</cell>"
            xmlString +=    "         </row>"
            xmlString +=    "        </rows>";
                            
        document.getElementById('txtxml').value = xmlString;                    
            
        var dv = document.getElementById(Container);
        mygrid = new dhtmlXGridObject(Container);
        
        mygrid.imgURL = "codebase/imgs/";
        mygrid.setHeader("Quanty,Item Descp,Price");
        
        mygrid.setInitWidths("200,200,100");
        mygrid.setColAlign("left,left,left");
        mygrid.setColTypes("ro,ed,ro");
        mygrid.setColSorting("str,str,str");
        mygrid.init();

        mygrid.loadXMLString(xmlString);    //problem
        mygrid.attachToObject(dv);    
    }
Answer posted by Support on Apr 08, 2008 03:14
>>mygrid.parseXML()
    It works in both pro and standard editions, can accept ready XML object or XML island ( can't be used to loading XML strings )

>> mygrid.loadXmlString()
    available in pro edition only

>>or am i missing some thing else
The code is correct, but loadXMLString available only in pro version.