igGrid - icon style changed
by georgianastasov
April 06, 2023
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/apiviewer.js"></script>
<script src="https://igniteui.com/js-data/northwind"></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>
<link href="https://igniteui.com/css/apiviewer.css" rel="stylesheet" type="text/css"></link>
<table id="grid" style="margin-bottom: 1rem;"></table>
<ul id="tree" style="margin-bottom: 1rem; background-color: black;"></ul>
<input type="button" id="changeColor" value="Change Color" />
CSS
/* setting the color of the columns according to your preference */
.ui-igcombo-buttonicon{
color: white !important;
}
.ui-iggrid-addrowicon{
color: white !important;
}
.ui-iggrid-colindicator{
color: white !important;
}
.ui-igtree-expander{
color: white !important;
}
.diffColor{
color: yellow !important;
}
.ui-corner-all{
}
JavaScript
$(function () {
var countries = ["UK", "USA"];
/*----------------- Instantiation -------------------------*/
$("#grid").igGrid({
virtualization: false,
autoGenerateColumns: false,
renderCheckboxes: true,
width: "100%",
height: "400px",
primaryKey: "EmployeeID",
columns: [{
headerText: "Employee ID", key: "EmployeeID", dataType: "number"
},
{
headerText: "First Name", key: "FirstName", dataType: "string"
},
{
headerText: "Last Name", key: "LastName", dataType: "string"
},
{
headerText: "Country", key: "Country", dataType: "string"
}
],
dataSource: northwind,
dataSourceType: "json",
responseDataKey: "results",
features: [
{
name: "Sorting",
type: "local"
},
{
name: "Responsive",
enableVerticalRendering: false,
columnSettings: [
{
columnKey: "EmployeeID",
classes: "ui-hidden-phone"
},
{
columnKey: "PostalCode",
classes: "ui-hidden-phone"
},
{
columnKey: "BirthDate",
classes: "ui-hidden-phone"
}
]
},
{
name: "Selection",
...