| First Name | Last Name | Product | Available | Ship Date | Quantity | Price |
|---|---|---|---|---|---|---|
| Nancy | Vileid | Espresso con Panna | true | 5/17/2026 | 9 | $3.25 |
| Elio | Nagase | Espresso con Panna | true | 9/23/2026 | 6 | $3.25 |
| Cheryl | Nagase | Doubleshot Espresso | false | 4/16/2026 | 9 | $3.30 |
| Regina | Devling | Caramel Latte | true | 2/22/2026 | 11 | $3.80 |
| Michael | Winkler | Doubleshot Espresso | false | 7/13/2026 | 4 | $3.30 |
| Mayumi | Burke | Caffe Americano | false | 9/4/2026 | 1 | $2.50 |
| Andrew | Nagase | Caffe Espresso | true | 4/12/2026 | 3 | $3.00 |
| Ian | Burke | Green Tea | false | 11/13/2026 | 5 | $1.50 |
| Yoshi | Petersen | White Chocolate Mocha | false | 7/23/2026 | 2 | $3.60 |
| Lars | Bjorn | Peppermint Mocha Twist | false | 7/14/2026 | 11 | $4.00 |
| Guylene | Devling | Caramel Latte | true | 8/6/2026 | 6 | $3.80 |
| Michael | Burke | Caffe Americano | false | 9/07/2026 | 11 | $2.50 |
| Petra | Vileid | White Chocolate Mocha | false | 8/18/2026 | 7 | $3.60 |
| Lars | Nodier | White Chocolate Mocha | false | 7/13/2026 | 8 | $3.60 |
The Load from Table demo of the jQuery Grid.
A live JavaScript/jQuery example of jqxGrid, the jQWidgets Grid component, with its complete source code below. It is one of 139 jqxGrid demos for jQuery.
autoheight property – Sets or gets the height of the grid to be equal to the summary height of the grid rows.width property – Sets or gets the Grid's width.columns property – Sets the Grid columns.columnsresize property – Enables or disables the columns resizing.sortable property – The sortable property enables or disables the sorting feature.source property – Sets and gets the source.To run it in your own page, load jqx.base.css, a theme and the library files below from npm (npm install jqwidgets-scripts) or the jsDelivr CDN, then add the markup and the script. jQuery is not required: jqxcore.js provides $. Getting started with jqxGrid shows the setup step by step.
The page loads jqx.base.css, a theme and these library files: jqxcore.js, jqxdata.js, jqxbuttons.js, jqxcheckbox.js, jqxscrollbar.js, jqxmenu.js, jqxgrid.js, jqxgrid.selection.js, jqxgrid.sort.js, jqxgrid.columnsresize.js, jqxgrid.edit.js, jqxlistbox.js, jqxdropdownlist.js.
It also loads helper scripts of this demo site, which are not part of the library: demos.js (getWidth() and other layout helpers).
$(document).ready(function () {
$("#loadButton").jqxButton();
$("#loadButton").click(function () {
// select rows.
var rows = $("#table tbody tr");
// select columns.
var columns = $("#table thead th");
var data = [];
for (var i = 0; i < rows.length; i++) {
var row = rows[i];
var datarow = {};
for (var j = 0; j < columns.length; j++) {
// get column's title.
var columnName = $.trim($(columns[j]).text());
// select cell.
var cell = $(row).find('td:eq(' + j + ')');
datarow[columnName] = $.trim(cell.text());
}
data[data.length] = datarow;
}
var source = {
localdata: data,
datatype: "array",
datafields:
[
{ name: "First Name", type: "string" },
{ name: "Last Name", type: "string" },
{ name: "Product", type: "string" },
{ name: "Available", type: "string" },
{ name: "Ship Date", type: "date", format: 'MM/dd/yyyy' },
{ name: "Quantity", type: "number" },
{ name: "Price", type: "number" }
]
};
var dataAdapter = new $.jqx.dataAdapter(source);
$("#grid").jqxGrid(
{
width: getWidth('Grid'),
source: dataAdapter,
columnsresize: true,
autoheight: true,
sortable: true,
columns: [
{ text: 'First Name', dataField: 'First Name', align: 'center', width: 130 },
{ text: 'Last Name', dataField: 'Last Name', align: 'center', width: 130 },
{ text: 'Product', dataField: 'Product', align: 'center', width: 170 },
{ text: 'Available', dataField: 'Available', columntype: 'checkbox', align: 'center', width: 90 },
{ text: 'Ship Date', dataField: 'Ship Date', align: 'center', cellsformat: 'd', width: 100},
{ text: 'Quantity', dataField: 'Quantity', align: 'center', cellsalign: 'right', width: 100 },
{ text: 'Price', dataField: 'Price', align: 'right', cellsalign: 'right', cellsformat: "c2" }
]
});
});
});
<div id="jqxWidget">
<table style="width: getWidth('Grid')px;" id="table" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th>
First Name
</th>
<th>
Last Name
</th>
<th>
Product
</th>
<th>
Available
</th>
<th>
Ship Date
</th>
<th>
Quantity
</th>
<th>
Price
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Nancy
</td>
<td>
Vileid
</td>
<td>
Espresso con Panna
</td>
<td>
true
</td>
<td>
5/17/2026
</td>
<td>
9
</td>
<td>
$3.25
</td>
</tr>
<tr>
<td>
Elio
</td>
<td>
Nagase
</td>
<td>
Espresso con Panna
</td>
<td>
true
</td>
<td>
9/23/2026
</td>
<td>
6
</td>
<td>
$3.25
</td>
</tr>
<tr>
<td>
Cheryl
</td>
<td>
Nagase
</td>
<td>
Doubleshot Espresso
</td>
<td>
false
</td>
<td>
4/16/2026
</td>
<td>
9
</td>
<td>
$3.30
</td>
</tr>
<tr>
<td>
Regina
</td>
<td>
Devling
</td>
<td>
Caramel Latte
</td>
<td>
true
</td>
<td>
2/22/2026
</td>
<td>
11
</td>
<td>
$3.80
</td>
</tr>
<tr>
<td>
Michael
</td>
<td>
Winkler
</td>
<td>
Doubleshot Espresso
</td>
<td>
false
</td>
<td>
7/13/2026
</td>
<td>
4
</td>
<td>
$3.30
</td>
</tr>
<tr>
<td>
Mayumi
</td>
<td>
Burke
</td>
<td>
Caffe Americano
</td>
<td>
false
</td>
<td>
9/4/2026
</td>
<td>
1
</td>
<td>
$2.50
</td>
</tr>
<tr>
<td>
Andrew
</td>
<td>
Nagase
</td>
<td>
Caffe Espresso
</td>
<td>
true
</td>
<td>
4/12/2026
</td>
<td>
3
</td>
<td>
$3.00
</td>
</tr>
<tr>
<td>
Ian
</td>
<td>
Burke
</td>
<td>
Green Tea
</td>
<td>
false
</td>
<td>
11/13/2026
</td>
<td>
5
</td>
<td>
$1.50
</td>
</tr>
<tr>
<td>
Yoshi
</td>
<td>
Petersen
</td>
<td>
White Chocolate Mocha
</td>
<td>
false
</td>
<td>
7/23/2026
</td>
<td>
2
</td>
<td>
$3.60
</td>
</tr>
<tr>
<td>
Lars
</td>
<td>
Bjorn
</td>
<td>
Peppermint Mocha Twist
</td>
<td>
false
</td>
<td>
7/14/2026
</td>
<td>
11
</td>
<td>
$4.00
</td>
</tr>
<tr>
<td>
Guylene
</td>
<td>
Devling
</td>
<td>
Caramel Latte
</td>
<td>
true
</td>
<td>
8/6/2026
</td>
<td>
6
</td>
<td>
$3.80
</td>
</tr>
<tr>
<td>
Michael
</td>
<td>
Burke
</td>
<td>
Caffe Americano
</td>
<td>
false
</td>
<td>
9/07/2026
</td>
<td>
11
</td>
<td>
$2.50
</td>
</tr>
<tr>
<td>
Petra
</td>
<td>
Vileid
</td>
<td>
White Chocolate Mocha
</td>
<td>
false
</td>
<td>
8/18/2026
</td>
<td>
7
</td>
<td>
$3.60
</td>
</tr>
<tr>
<td>
Lars
</td>
<td>
Nodier
</td>
<td>
White Chocolate Mocha
</td>
<td>
false
</td>
<td>
7/13/2026
</td>
<td>
8
</td>
<td>
$3.60
</td>
</tr>
</tbody>
</table>
<input style="margin-top: 10px;" type="button" id="loadButton" value="Load jqxGrid from Table">
<div style="margin-top: 10px;" id="grid">
</div>
</div>