JSFiddle - React, Tailwind, and code Playground
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-employees"></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>
<h3>Single Cell Selection</h3>
<table id="singleCellSelectionGrid"></table>
<br />
<h3>Multiple Cell Selection</h3>
<table id="multipleCellSelectionGrid"></table>
<br />
<h3>Multiple Row Selection</h3>
<table id="rowSelectionGrid"></table>
<br />
<h3>Multiple Row Selection with Row Selectors</h3>
<table id="rowSelectionRowSelectorsGrid"></table>
JavaScript
$(function () {
createSingleCellSelectionGrid();
createMultipleCellSelectionGrid();
createRowSelectionGrid();
createRowSelectionRowSelectorsGrid();
});
function createSingleCellSelectionGrid() {
$("#singleCellSelectionGrid").igGrid({
width: "100%",
autoGenerateColumns: false,
dataSource: northwindEmployees,
responseDataKey: "results",
dataSourceType: "json",
columns: [
{ headerText: "Employee ID", key: "ID", dataType: "number", width: "120px" },
{ headerText: "Name", key: "Name", dataType: "string" },
{ headerText: "Title", key: "Title", dataType: "string" },
{ headerText: "Phone", key: "Phone", dataType: "string" }
],
features: [
{
name: 'Responsive',
enableVerticalRendering: false,
columnSettings: [
{
columnKey: 'ID',
classes: 'ui-hidden-phone'
}
]
},
{
name: "Selection",
mode: "cell",
multipleSelection: false,
touchDragSelect: false, // this is true by default
multipleCellSelectOnClick: false
}
]
});
}
function createMultipleCellSelectionGrid() {
$("#multipleCellSelectionGrid").igGrid({
width: "100%",
autoGenerateColumns: false,
dataSource: northwindEmployees,
responseDataKey: "results",
dataSourceType: "json",
columns: [
{ headerText: "Employee ID", key: "ID", dataType: "number", width: "120px" },
{ headerText: "Name", key: "Name", dataType: "string" },
{ headerText: "Title", key: "Title", dataType: "string" },
{ headerText: "Phone", key: "Phone", dataType: "string" }
],
features: [
{
name: 'Responsive',
enableVerticalRendering: false,
columnSettings: [
{
columnKey: 'ID',
classes: 'ui-hidden-phone'
}
]
},
{
name: "Selection",
mode: "cell",
multipleSelection: true,
touchDragSelect: false, // this is true by default
multipleCellSelectOnClick:...