igGrid column hiding in multi column header
by georgianastasov
HTML
<script src="https://igniteui.com/js/modernizr.min.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/latest/js/infragistics.core.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.lob.js"></script>
<script src="https://igniteui.com/js-data/nw-customers"></script>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet"></link>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/structure/infragistics.css" rel="stylesheet"></link>
<table id="grid"></table>
<br />
<input type="button" id="hideButton" value="Hide Contact Title Column" />
JavaScript
$(function () {
$("#grid").igGrid({
width: "100%",
height: "500px",
autoGenerateColumns: false,
dataSource: nwCustomers,
responseDataKey: "results",
columns: [
{ headerText: "Customer ID", key: "CustomerID", dataType: "string", width: "100px" },
{
headerText: "Company Information",
group: [
{ headerText: "Company Name", key: "CompanyName", dataType: "string", width: "150px" },
{ headerText: "Contact Name", key: "ContactName", dataType: "string", width: "150px" },
{ headerText: "Contact Title", key: "ContactTitle", dataType: "string", width: "150px" }
]
},
{
headerText: "Address Information",
group: [
{
headerText: "Local Address",
group: [
{ headerText: "Address", key: "Address", dataType: "string", width: "150px" },
{ headerText: "City", key: "City", dataType: "string", width: "100px" }
]
},
{ headerText: "Postal Code", key: "PostalCode", dataType: "string", width: "100px" }
]
},
{
headerText: "Phone Information",
group: [
{ headerText: "Phone", key: "Phone", dataType: "string", width: "150px" },
{ headerText: "Fax", key: "Fax", dataType: "string", width: "150px" }
]
}
],
features: [
{
...