I was able to load data via XML. Now, I would like to set header name via XML and come out with this code but I don’t know whether it is correct or not.
Appreciate if somebody can help me.
====================================
Response.ContentType = “text/xml”
Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")
Response.Write("")
Response.write("")
Response.write(“First Column”)
Response.write("")
Response.write("")
Response.write(“Second Column”)
Response.write("")
Response.write("")
Response.write(“Third Column”)
Response.write("")
Response.Write("")
======================================
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setImagePath(‘codebase/imgs/’);
mygrid.setHeader(“Name, Location, Department”);
mygrid.setColumnIds(“c1,c2,c3”);
mygrid.setInitWidths(“150,150,150”)
mygrid.setColAlign(“left,left,left”)
mygrid.setColTypes(“txt,txt,txt”);
mygrid.setColSorting(“str,str,str”)
mygrid.submitOnlyChanged(false);
mygrid.setFieldName("{GRID_ID}{ROW_INDEX}{COLUMN_INDEX}");
mygrid.enableColumnMove(true);
mygrid.init();
mygrid.setSkin(“dhx_skyblue”)
mygrid.loadXML(“dhtmlx/dhtmlxGrid/samples/common/grid.xml”);