Different XML formats

The default xml format has the following tags: <rows> as a top, <row> to define rows and <cell> to set cells inside specified row. But tag names can be changed like in the sample presented below.

Grid supports two additional XML formats, which are based on column IDs:

"xmlA" format Reload grid from xml file in xmlA format

"xmlB" format Reload grid from xml file in xmlB format
</> Source
<!DOCTYPE html>
<html>
<head>
	<title>Different XML formats</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myGrid;
		function doOnLoad(){
			myGrid = new dhtmlXGridObject('gridbox');
			myGrid.setImagePath("../../../codebase/imgs/");
			myGrid.setHeader("Column A, Column B,Column C");
			myGrid.setInitWidths("80,200,*");
			myGrid.setColAlign("right,left,left");
			myGrid.setColTypes("dyn,ed,ed");
			myGrid.setColSorting("int,str,str");
			myGrid.setColumnIds("first,second,third");
			myGrid.xml.top="mytop";
			myGrid.xml.row="./myrow";
			myGrid.init();
			myGrid.load("../common/custom.xml","xml");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Different XML formats</h1>
	<p>The default xml format has the following tags: &lt;rows&gt; as a top, &lt;row&gt; to define rows and &lt;cell&gt; to set cells inside specified row. But tag names can be changed like in the sample presented below.</p>
	<div id="gridbox" style="width:500px; height:300px; background-color:white;"></div>
	<p>Grid supports two additional XML formats, which are based on column IDs:</p>
	<b>"xmlA"</b> format
	<a href="javascript:void(0)" onclick="myGrid.xml.top='rows';myGrid.xml.row='./row';myGrid.clearAll();myGrid.load('php/xmlA.php','xmlA');">Reload grid from xml file in xmlA format</a><br/>
	<br/>
	<b>"xmlB"</b> format
	<a href="javascript:void(0)" onclick="myGrid.xml.top='rows';myGrid.xml.row='./row';myGrid.clearAll();myGrid.load('php/xmlB.php','xmlB');">Reload grid from xml file in xmlB format</a>
</body>
</html>

Documentation

Check documentation to learn how to use the components and easily implement them in your applications.