Notification Test
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<link rel="stylesheet" href="https://www.jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="https://www.jqwidgets.com/public/jqwidgets/styles/jqx.arctic.css">
<script src="https://www.jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<script src="https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/generatedata.js"></script>
<script src="http://www.jqwidgets.com/jquery-widgets-demo/scripts/demos.js"></script>
<script src="https://www.jqwidgets.com/jquery-widgets-demo/scripts/demos.js"></script>
<body class='default'>
<div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;">
<div id="jqxgrid">
</div>
</div>
</body>
CSS
body { width: 100%; height: 100%; }
JavaScript
$(document).ready(function () {
// prepare the data
var ordersSource =
{
datatype: "xml",
datafields: [
{ name: 'ShippedDate', map: 'm\\:properties>d\\:ShippedDate', type: 'date' },
{ name: 'Freight', map: 'm\\:properties>d\\:Freight', type: 'float' },
{ name: 'ShipName', map: 'm\\:properties>d\\:ShipName', type: 'string' },
{ name: 'ShipAddress', map: 'm\\:properties>d\\:ShipAddress', type: 'string' },
{ name: 'ShipCity', map: 'm\\:properties>d\\:ShipCity', type: 'string' },
{ name: 'ShipCountry', map: 'm\\:properties>d\\:ShipCountry', type: 'string' }
],
root: "entry",
record: "content",
id: 'm\\:properties>d\\:OrderID',
url: "https://dl.dropboxusercontent.com/u/41774950/orders.xml",
pager: function (pagenum, pagesize, oldpagenum) {
// callback called when a page or page size is changed.
},
updaterow: function (rowid, rowdata, result) {
// synchronize with the server - send update command
// call result with parameter true if the synchronization with the server is successful
// and with parameter false if the synchronization failder.
result(true);
}
};
var ordersAdapter = new $.jqx.dataAdapter(ordersSource);
var cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties) {
return '<span style="position: relative; width: 100%; margin: 4px; float: ' + columnproperties.cellsalign + ';">' + value + '<img src="https://www.jqwidgets.com/public/jqwidgets/styles/images/icon-down.png" style="position: absolute; right: 5px;" /></span>';
}
...