data is not displaying in grid in portlets

Hi,



xml data is not getting displayed in portlets…



My code is …







    

<%=request.getAttribute(“xmlString”)%>
















    

    mygrid = new dhtmlXGridObject(‘gridbox’);

        mygrid.selMultiRows = true;

        mygrid.setImagePath("/wps/imagegrid/icons_greenfoldersimages/");    

        mygrid.setHeader(“First Name,Last Name,Country,Email,Role”);

        mygrid.setInitWidths(“100,100,100,100,200”);

        mygrid.setColAlign(“left,center,center,center,center”);

        mygrid.setColSorting(“str,str,str,str,str”);

        mygrid.setColTypes(“ro,ed,ed,ro,ro”);

        mygrid.enableCollSpan(true);

        mygrid.enableTooltips(“false,false,false,false,false”);

        mygrid.enableMultiline(true);

        mygrid.enableEditEvents(true,true,true,true,true);

        mygrid.init();

        mygrid.setSkin(“modern”);

        mygrid.clearAll();

     mygrid.parse(document.getElementById(“xmlIsLand”).innerHTML);







This is working perfectly fine when i tested in eclipse.

But the data is not loading in IBM portlets in LDE .



Header names are coming correctly.



Even i tested for “<%=request.getAttribute(“xmlString”)%>”…the data is coming when i click on view page source in browser…



but it is not displaying in grid…



Pls help me .





Thanks,

Santosh.

document.getElementById(“xmlIsLand”).innerHTML
This code is not cross browser safe, based on used doctype it may result in different data returned
The next is more safe approach
- if string a quote safe
mygrid.parse("<%=request.getAttribute(“xmlString”)%>");
- in other case
<textarea id=“xmlIsLand” style=“display:none”><%=request.getAttribute(“xmlString”)%></textarea>

mygrid.parse(document.getElementById(“xmlIsLand”).value);

i used mygrid.parse…
it is saying it is not a function.

I am having 1.6 pro version.

and even i used below code
 <textarea id=“xmlIsLand” style=“display:none”><%=request.getAttribute(“xmlString”)%></textarea>
      …
      mygrid.parseXML(document.getElementById(“xmlIsLand”).value);


it is saying document.getElementById(“xmlIsLand”).value is not a function.

pls advice

Which version of dhtmlxgrid you are using?
In case of dhtmlxgrid 1.5 or lesser the command above must be as
- if string a quote safe
mygrid.loadXMLString("<%=request.getAttribute(“xmlString”)%>");
- in other case
<%=request.getAttribute(“xmlString”)%>

mygrid.loadXMLString(document.getElementById(“xmlIsLand”).value);