Skip to content

Instantly share code, notes, and snippets.

@skycrossman
Created May 27, 2020 15:45
Show Gist options
  • Save skycrossman/f4cb1c934d846ad94c838960c384c641 to your computer and use it in GitHub Desktop.
Save skycrossman/f4cb1c934d846ad94c838960c384c641 to your computer and use it in GitHub Desktop.
var xmlString = `<?xml version="1.0" encoding="utf-8"?>
<table font="Microsoft Sans Serif-8" sel_bgColor="steelbue" sel_TextColor="white" header_BgColor="buttonface" expandroot="true" expandall="false" treelines="1" editable="false" draw_grid="true" multiselect="true" column_draggable="false" enableHtml="false" enterAsTab="false" bgInvert="true"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:aras="http://www.aras.com"
xmlns:usr="urn:the-xml-files:xslt">
<thead>
<th align="c">Part Number</th>
<th align="c">Revision</th>
<th align="c">Sequence</th>
<th align="c">Quantity</th>
</thead>
<columns>
<column width="220" edit="NOEDIT" align="l" order="0" />
<column width="60" edit="NOEDIT" align="c" order="1" />
<column width="60" edit="NOEDIT" align="c" order="2" sort="numeric"/>
<column width="60" edit="NOEDIT" align="c" order="3" sort="numeric"/>
</columns>
<menu>
<emptytag/>
</menu>
<tr level="0" icon0="../images/Part.svg" icon1="../images/Part.svg" class = "dragClass">
<userdata key="gridData_rowItemID" value=" " />
<td>First</td>
<td>A</td>
<td>10</td>
<td>2</td>
<tr level="1" icon0="../images/Part.svg" icon1="../images/Part.svg" class = "dragClass">
<userdata key="gridData_rowItemID" value=" " />
<td>Second</td>
<td>A</td>
<td>10</td>
<td>6</td>
</tr>
<tr level="1" icon0="../images/Part.svg" icon1="../images/Part.svg" class = "dragClass">
<userdata key="gridData_rowItemID" value=" " />
<td>Third</td>
<td>A</td>
<td>10</td>
<td>2</td>
</tr>
</tr>
</table>`;
this.grid.InitXML(xmlString, true);
this.fixGridHeight(this.grid);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment