JSFiddle - React, Tailwind, and code Playground
by dkamburov
HTML
<script src="https://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/2018.1/latest/js/infragistics.core.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/2018.1/latest/js/infragistics.lob.js"></script>
<script src="https://igniteui.github.io/help-samples/data-files/northwind.js"></script>
<link href="https://cdn-na.infragistics.com/igniteui/2018.1/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet">
<link href="https://cdn-na.infragistics.com/igniteui/2018.1/latest/css/structure/infragistics.css" rel="stylesheet">
<table id="hierarchicalGrid"></table>
JavaScript
$(function () {
//Remove the first row child
northwind.results[0].Orders = [];
$("#hierarchicalGrid").igHierarchicalGrid({
width: "100%",
autoGenerateColumns: false,
dataSource: northwind,
responseDataKey: "results",
dataSourceType: "json",
caption: "Orders By Employee",
features: [
{
name: "Responsive",
enableVerticalRendering: false,
columnSettings: [
{
columnKey: "Title",
classes: "ui-hidden-phone"
},
{
columnKey: "Address",
classes: "ui-hidden-phone"
}
]
},
{
name: "Sorting",
inherit: true
},
{
name: "Paging",
pageSize: 5,
type: "local",
inherit: true
}
],
columns: [
{ key: "EmployeeID", headerText: "Employee ID", dataType: "number", width: "0%", hidden: true },
{ key: "FirstName", headerText: "First Name", dataType: "string", width: "20%" },
{ key: "LastName", headerText: "Last Name", dataType: "string", width: "20%" },
{ key: "Title", headerText: "Title", dataType: "string", width: "20%" },
{ key: "Address", headerText: "Address", dataType: "string", width: "25%" },
{ key: "City", headerText: "City", dataType: "string", width: "15%" }
],
autoGenerateLayouts: false,
columnLayouts: [
{
key: "Orders",
responseDataKey: "results",
width: "100%",
autoGenerateColumns: false,
primaryKey: "OrderID",
columns: [
{ key: "OrderID", headerText: "Order ID", dataType: "number",...