jQWidgets Multi Select Test
HTML
<script src="http://jqwidgets.com/jquery-widgets-demo/jqwidgets/jqx-all.js"></script>
<link rel="stylesheet" href="http://jqwidgets.com/jquery-widgets-demo/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/jquery-widgets-demo/jqwidgets/styles/jqx.fresh.css">
<div id="myApp"></div>
CSS
body {
background-color: #ffe;
}
#myApp {
position: absolute;
top: 20px;
left: 20px;
bottom: 20px;
right: 20px;
}
JavaScript
var myTable = $('<div id="myTable"></div>')
$('#myApp').append(myTable);
// prepare the data
var source = {
localdata: [
["Futter&kiste", "Maria Anders", "Germany"],
["Emparedados&helados", null, "Mexico"],
["Trujillo&Emparedados", "Ana Trujillo", "Mexico"],
["Eten bij Michel", "Michel", "Netherlands"],
["One&Only", "Marcel Groen", "Germany"],
["Bellini", "Pedrazzetti", "Switzerland"]
],
datafields: [{
name: 'Company',
map: '0',
}, {
name: 'Contact',
map: '1',
}, {
name: 'Country',
map: '2',
}],
datatype: "array"
};
// create the grid
myTable.jqxGrid({
source: new $.jqx.dataAdapter(source),
width: 500,
height: 240,
sortable: true,
selectionmode : 'multiplerowsextended',
columns: [{
text: 'Company Name',
datafield: 'Company'
}, {
text: 'Contact Name',
datafield: 'Contact'
}, {
text: 'Country Name'.
datafield: 'Country'
}]
});