IE Issues Displaying Data -- related to <head> tag in data..

My code looks like this:



mygrid = new dhtmlXGridObject(‘mygrid_container’);

     mygrid.setImagePath(“dhtmlx/dhtmlxGrid/codebase/imgs/”);

     mygrid.setHeader(“Property,Value”);

     mygrid.setInitWidths(“150,*”);

     mygrid.enableAutoHeight(true);

     mygrid.setColAlign(“left,left”)

     mygrid.setSkin(“light”);

     mygrid.setColSorting(“str,str”);

     mygrid.setColTypes(“ed,ed”);

     mygrid.attachEvent(“onRowSelect”,doOnRowSelected);

     mygrid.enableColumnAutoSize(false);

     mygrid.init();

     theURL = “dhtmlx/test.xml”;

     var rand_no = Math.random();

     theURL += “?rnd=”+rand_no;

         

     mygrid.loadXML(theURL);



The XML that it loads looks like this:

<?xml version="1.0" encoding="iso-8859-1"?>









        

        

        

    

    

            



                         

                 LAT



     51.5330232

    

    

                 





If you try this, it doesn’t seem to work in IE. Strangely, taking out the … tag seems to make it all work. Anyone got any ideas?



Thanks!

Grid configuration need to be defined fully in js code or fully in XML code
In your case correct initial values defined in js code, but during XML parsing , component finds the section in XML and drop all previously defined configuration. The configuration provided in XML miss column names and column widths - which result in error.

What was the purpose of head section in XML when you already have all config in js code ?

In this case, we want to be able to specify the values for the combobox.

I was following the examples given in the tutorial – if I ONLY want to specify the values for the combobox (when I am editing it), could you advise on the best way to achieve this?

Thanks!

In common case, configuration of combo-boxes are part of grid’s configuration. So if all configuraton defined in XML - combo configuration can be stored there as well. If all configuration done in js code - configuration of combo can be done through js code as well.

mygrid = new dhtmlXGridObject(‘mygrid_container’);

mygrid.setImagePath(“dhtmlx/dhtmlxGrid/codebase/imgs/”);


mygrid.setColTypes(“co,ed”);

var combo=mygrid.getCombo(0);//0-index of column
combo.put(“value 1”,“label 1”)
combo.put(“value 2”,“label 2”)
combo.put(“value 3”,“label 3”)

Thanks! That works a treat – I went down the configuration in the XML route, as this was easiest.